raw.githubusercontent.com adding filename with directory for non-human-readable files #17023
Unanswered
dhalbert
asked this question in
Other Feature Feedback, Questions, & Ideas
Replies: 1 comment
-
|
Hello. You can report the bug here: https://support.github.com/contact/bug-report |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We're not sure if this behavior is old or new. Do you know?
This kind of URL:
https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/main/examples/dip.wav
is causing a browser to download the file as
examples_dip.wav.The reason is that the HTTP headers are specifying
examples/dip.wavas thefilename:$ curl -I https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/main/examples/dip.wav HTTP/2 200 ... content-disposition: attachment; filename=examples/dip.wav ...Since the browser (Chrome or Firefox) won't create the
examplesdirectory, it changes the/to_, and downloadsexamples_dip.wav.We want the user to be able to download
dip.wavdirectly, with its original name, and have webpages with links like that. (The original URL is actuallyhttps://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/raw/main/examples/dip.wav, but it redirects toraw.githubusercontent.com.)If you happen to know this behavior is new, I'll report it as a bug. Otherwise maybe it never worked the way we thought.
Beta Was this translation helpful? Give feedback.
All reactions