Disable Content-Disposition Header for Object Storage

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

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!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct