aus_driver_amazon_s3 icon indicating copy to clipboard operation
aus_driver_amazon_s3 copied to clipboard

MIME type of .js file: text/plain

Open cweiske opened this issue 4 years ago • 1 comments

When uploading a javascript file with .js extension, it gets uploaded with mime type "text/plain".

This leads to problems because browsers reject .js files with the wrong mime type if the HTTP header x-content-type-options: nosniff is set.

I doubt that the magic file database will ever correctly detect the mime type of a javascript file, because there are no stable markers it could use. This driver here should cater for that problem, and manually fix the type.

Related to #84.

cweiske avatar Jul 22 '21 11:07 cweiske

MinIO automatically adds this header now: https://github.com/minio/minio/pull/12256

cweiske avatar Jul 22 '21 12:07 cweiske

Hi @cweiske We merged https://github.com/andersundsehr/aus_driver_amazon_s3/pull/141 which should solve this issue

weakbit avatar Sep 30 '24 12:09 weakbit