New MS Office file types vs Mediawiki

With the proliferation of MS Office 2007+ we’ve been having problems with uploading the new “x” file types to older MediaWiki sites. Really unsatisfying solution follows.

The docx, xlsx, etc. file files are actually compressed xml files. Older versions of MediaWiki are having trouble with these. A quick (and totally insecure) fix is to add the following to LocalSettings.php:

$wgVerifyMimeType = false;

This will cause the software to skip verifying the MIME type. It technically opens up a security hole and so isn’t a final solution, but at least it will get you working while researching the issue.