Disable Content-Disposition Header for Object Storage
Linode
Linode Staff
When using Object Storage, my PDF files are being downloaded automatically, rather than opening up in a browser tab. How do I disable this?
1 Reply
ashetzler
Linode Staff
Howdy! You can utilize s3cmd to make this adjustment and update your content-delivery header. Down below, you can make the adjustment from “attachment”, which will download the file automatically, to “inline” which should open your object into a browser tab.
From:
--content-disposition=CONTENT_DISPOSITION
Provide a Content-Disposition for signed URLs, e.g.,
“attachment; filename=myvideo.mp4"
--content-type=CONTENT_TYPE
Provide a Content-Type for signed URLs, e.g.,
"video/mp4"
To:
--content-disposition=CONTENT_DISPOSITION
Provide a Content-Disposition for signed URLs, e.g.,
"inline; filename=myvideo.mp4"
--content-type=CONTENT_TYPE
Provide a Content-Type for signed URLs, e.g.,
"video/mp4"
Hope this helps!