3

Users can upload documents through the my site. It it stored in a private AWS S3 bucket. If they want to preview those uploaded files from my site, I generate a pre-signed URL and stick it in an <embed> tag. I was wondering if this is the best way to do this?

It currently works most of the time, however a few users don't get the preview, instead their browser wants to download the file. Mostly on Windows machines.

Any insight or help would be greatly appreciated!

Andrew Brown
  • 125
  • 14
  • 3
    Have you checked the content type for the files that try to download? You can see it in the metadata for the object in S3 – Chris Williams Aug 30 '20 at 07:28
  • 2
    Yeah your right, s3 auto sets it to ocset-stream, no good. Will have to set the content-type before I upload it. Thanks man. – Andrew Brown Aug 31 '20 at 03:31

0 Answers0