
plaws at ou
Jun 25, 2008, 8:29 AM
Post #1 of 1
(618 views)
Permalink
|
|
MS strikes again (mime types)
|
|
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 -- Peter Laws / N5UWY National Weather Center / Network Operations Center University of Oklahoma Information Technology plaws [at] ou ----------------------------------------------------------------------- Feedback? Contact my director, Craig Cochell, craigc [at] ou Thank you!
|