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