Thread:Project:Support desk/Some Files Not Typed Properly/reply (2)

Ah, interesting. I tried setting $wgMimeTypeFile = "/etc/mime.types"; and attempted to upload the file again, but with the same result (I sooo hoped that was the answer!). It's mime type is being detected as application/zip, when should (I think) be application/vnd.ms-excel. Setting $wgMimeTypeFile = null; allows the upload, but still types it incorrectly. If you try to move it, it "doesn't match it's type".

What I really don't get is how fileinfo types it correctly, but somewhere mediawiki (which I've specificaly set (supposedly) to use fileinfo) does not. It looks like maybe MimeMagic.php could be doing it, after somehow failing to type it from the file's header data.

I tried disabling type detection altogehter with $wgVerifyMimeType = false; (there's low security risk in my environment), which allows uploading of files, but blows up when you try to move them. Seems the setting applies at upload, but not during a file move.

Might there be a way to set MIME type based on the file extension only? It would save a lot of these headaches, and be of little risk in our particular installation.