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
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"