Skip to content

Instantly share code, notes, and snippets.

@shivanshthapliyal
Last active March 5, 2020 11:00
Show Gist options
  • Save shivanshthapliyal/940d762c952c1b78476829f32ecec8b6 to your computer and use it in GitHub Desktop.
Save shivanshthapliyal/940d762c952c1b78476829f32ecec8b6 to your computer and use it in GitHub Desktop.
AWS-S3

AWS-S3


Experimenting with the S3 object content types.

Goto Properties -> Metadata of S3 Object -> Add metadata -> Select content type

  • application/pdf -> to render the pdf in the browser
  • application/pdfContent -> to download the file

Header example:

To indicate to the browser that the file should be viewed in the browser:

Content-Type: application/pdf
Content-Disposition: inline; filename="filename.pdf"

To have the file downloaded rather than viewed:

Content-Type: application/pdfContent-Disposition: attachment; filename="filename.pdf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment