Incorrect mime-types (content-type header) for mp4 and js

When uploading to S3, we have to specify headers like the Content-Disposition and Content-Type of the file. These are the values that will be returned when loading the file - PutObject - Amazon Simple Storage Service

Can you explain when this is happening?

The PR will remove the Content-Disposition: attachment header which forces the download regardless of any browser you use.

Once you’ve upgraded your site, the Content-Type is used instead, and the browser will decide what to do with it. One thing to note, there is no problem with Content-Type: application/mp4 on Safari and Firefox, but on Chrome, it still forces a download (probably due to some bad history Chrome has with the mp4 file type).

2 Likes