AWS s3 file downloads not working in Chrome specifically

+1 vote

S3 holds my PDf files. Each time I try downloading these. I get nothing. This download however is possible on other browsers. My console gives error 'Resource interpreted as other but transferred with MIME type undefined.'

I have one thread on AWS. I can’t tell users to go & disable this plugin & then download.

Is it a problem from AWS end?

May 18, 2018 in Cloud Computing by code_ninja
• 6,290 points

2 answers to this question.

0 votes

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 this:

answered May 18, 2018 by DragonLord999
• 8,450 points
0 votes

The canonical Internet media type for a PDF document is actually application/pdf as defined in The application/pdf Media Type (RFC 3778) - please note that application/x-pdf, while commonly encountered and listed as a media type in Portable Document Format as well, is notably absent from the official Application Media Types listed by the Internet Assigned Numbers Authority (IANA).

I'm not aware of why and when application/x-pdf came to life, but apparently the Chrome PDF Plugin does not open application/x-pdf documents as of today.

Consequently you should be able to trigger a different behavior in Chrome by changing the media type of the stored objects accordingly.

Alternative (for authenticated requests)

Another approach would be to Force a PDF to download instead of letting Chrome attempt to open it, which can be done by means of triggering the Content-Diposition: attachment header with your GET request - please see the S3 documentation for GET Object on how to achieve this via the response-content-disposition request parameter, specifically response-content-disposition=attachment as demonstrated there in section Sample Request with Parameters Altering Response Header Values.

answered Sep 4, 2018 by eatcodesleeprepeat
• 4,710 points

Related Questions In Cloud Computing

0 votes
1 answer

why aws s3 transfer acceleration is not working?

AWS S3 Transfer Acceleration enables fast, easy ...READ MORE

answered Feb 16, 2022 in Cloud Computing by anonymous
+4 votes
4 answers

AWS S3 cli isn’t working on Windows server

The error message has nothing to do ...READ MORE

answered Aug 20, 2018 in Cloud Computing by Priyaj
• 58,090 points
+3 votes
6 answers

Are the S3 buckets in AWS, Region Specific?

Yes S3 buckets are region specific. When you ...READ MORE

answered Oct 16, 2018 in Cloud Computing by Rijo
+4 votes
3 answers

AWS S3 pricing - data transfer in/out

All traffic FROM mobile phones to S3 ...READ MORE

answered Oct 16, 2018 in Cloud Computing by anish
+2 votes
2 answers

Is there a way to add cache control in AWS S3?

use of  current upstream master branch will ...READ MORE

answered Apr 10, 2018 in Cloud Computing by hemant
• 5,790 points
0 votes
1 answer

File Renaming in S3

Directly? Well , no you need to ...READ MORE

answered Apr 13, 2018 in Cloud Computing by brat_1
• 7,200 points
+1 vote
3 answers

AWS EC2: Is it possible to edit httpd.conf file in

It would be prompting you a alert, ...READ MORE

answered Aug 17, 2018 in Cloud Computing by Priyaj
• 58,090 points
0 votes
1 answer

AWS: Is there a way I can edit files in S3 right away in the browser?

There is not currently an AWS-supported method ...READ MORE

answered Jun 19, 2018 in Cloud Computing by Meci Matt
• 9,460 points
+1 vote
2 answers

What if I delete default VPC in AWS?What are the consequences?

If you wish to recreate the default ...READ MORE

answered Apr 20, 2018 in Cloud Computing by DragonLord999
• 8,450 points
0 votes
3 answers

Maximizing value of max_connections in AWS RDS

AWS RDS Max Connections Limit As Per ...READ MORE

answered Jul 24, 2020 in Cloud Computing by Sagar
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP