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

**URL:** <https://meta.discourse.org/t/incorrect-mime-types-content-type-header-for-mp4-and-js/257802>\
**Category:** Bug\
**Created:** [March 11, 2023, 3:27pm UTC](https://meta.discourse.org/t/incorrect-mime-types-content-type-header-for-mp4-and-js/257802 "2023-03-11T15:27:21Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)\
**Post date:** [January 7, 2025, 2:46am UTC](https://meta.discourse.org/t/incorrect-mime-types-content-type-header-for-mp4-and-js/257802/18 "2025-01-07T02:46:39Z")

</div>

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](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax)

> [@Canapin](#):
>
> when the forced download occurs even when not using s3?

Can you explain when this is happening?

> [@Canapin](#):
>
> Will it also fix forced download for other files that could be opened in the browser such as PDFs?

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).

---

_[View the full topic](https://meta.discourse.org/t/incorrect-mime-types-content-type-header-for-mp4-and-js/257802)._
