Peter Laws wrote:
OK, so I've got it so that it doesn't reject vsd/xls/pdf outright, but now I've got the infamous "The file is corrupt or has an incorrect extension" message.
I have "$wgMimeDetectorCommand= "file -bi";" but I note that when I run "file -bi" against an XLS file, I get
application/msword
Is that the right MIME type for an MS-Excel spreadsheet?
So it seems this is, surprise, a problem with magic in MS-Office-related files (XLS, VSD, PPT, DOC), namely that they all are IDed as application/msword.
Someone sent me a patch for MimeMagic.php that has a bunch of conditionals in it that will apparently work around MS' problem. Cool!
Except that patch barfs on it. I'm no patch wizard or PHP wizard, but it appears to me that MimeMagic.php's code has changed enough that patch couldn't insert the changes.
Anyone have this happen and have a workaround for the patch? Or an updated patch? Or hints?
Interestingly, we just ran into a problem with Exchange rejecting attachments as spam because, ta da, Thunderbird assigns an "incorrect" mime-type to MS files!
Peter