This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis
Recently, I had a quick discussion in Contentful's community Slack about file downloads. The person I was talking to asked if there is a way to add the Content-Disposition
header to uploaded assets. Unfortunately, that's not possible, but this header was news to me! ?
After reading the MDN documentation about Content-Disposition I learned that you could trigger the "Save as" dialog in browsers by applying the response header.
Content-Disposition: attachment; filename="cool.html"
Pretty cool!
Reply to Stefan
This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis
Stefan Judis | Sciencx (2020-07-04T22:00:00+00:00) Downloads can be triggered via HTTP headers (#tilPost). Retrieved from https://www.scien.cx/2020/07/04/downloads-can-be-triggered-via-http-headers-tilpost/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.