Note
This is the scripted version of GitHub Media Dropper, which does the same thing by hand.
Upload a media file to GitHub's user-attachments store from the command line and print the embed URL; the same URL you get by dragging the file into a comment box.
./github-media-dropper.sh path/to/demo.mp4 [owner/repo]Prints a https://github.com/user-attachments/assets/<uuid> URL ready to paste into a README, issue, or comment.
Videos render as an inline player.
gh(authenticated) andjq- A repository you can push to (defaults to the repo in the current directory); the asset is scoped to it
- The endpoint (
uploads.github.com/user-attachments/assets) is unofficial and undocumented, so it may stop working without notice. The manual drag-and-drop is the fallback. - A valid asset URL returns
404tocurl; it only resolves in a browser context. Don't usecurlto check whether an upload worked.