Vijay Kumbhar
Vijay Kumbhar

Reputation: 916

AWS s3 file downloads are not working in Chrome (Works fine with IE, Mozilla, Safari)

I am using s3 to store my pdf files. But when i tries to download the files from s3 using chrome browser it doesn't do anything. It just refresh the page, no error, nothing ... But from other browsers i can download that file. When i checked in the console it gives 'Resource interpreted as Other but transferred with MIME type undefined.'

I got one thread from AWS https://forums.aws.amazon.com/thread.jspa?threadID=79493

But we can not tell user that go & disable this plugin & then download.

Is it a problem from AWS end?

I searched a lot but didn't get any solution. Please help me to resolve this issue.

Thanks, Vijay

Upvotes: 12

Views: 7898

Answers (1)

James Lim
James Lim

Reputation: 13062

I had this problem too. The solution it to force Chrome to download the PDF file instead of trying to open it in its reader.

In your GET request, append response-content-disposition=attachment. Refer to the S3 documentation on how to do this.

More details available here.

Upvotes: 13

Related Questions