Hi Bawolff,
I ran into a similar issue. My Powerpoint is pptx and as you pointed out it's zip based format. It won't let me upload the pptx file. The error is: File extension ".pptx" does not match the detected MIME type of the file (application/zip).
When I disabled MIME type check ($wgVerifyMimeType = false;), the file is uploaded and identified MIME type as application/vnd.openxmlformats-officedocument.presentationml.presentation
However, we can't disabled MIME type since there's a security risk by doing so.
Per Mediawiki documentation page: Manual:MIME type detection
I can use this $wgMimeDetectorCommand = "file -bi"; to have the OS handles the MIME type.
But for some reason that configuration doesn't do anything. I am not sure if I need to do something else for that to take effect.
Before and after configure $wgMimeDetectorCommand = "file -bi";
I always see the same in the debug log:
[Mime] MimeAnalyzer::doGuessMimeType: analyzing head and tail of /tmp/phpBHWM00 for magic numbers.
[Mime] MimeAnalyzer::doGuessMimeType: ZIP signature present in /tmp/phpBHWM00
[Mime] MimeAnalyzer::detectZipType: unable to identify type of ZIP archive
[Mime] MimeAnalyzer::guessMimeType: guessed mime type of /tmp/phpBHWM00: application/zip
[Mime] MimeAnalyzer::improveTypeFromExtension: improved mime type for .pptx: application/zip
MediaHandlerFactory::getHandler: no handler found for application/zip.
mime: <application/zip> extension: <pptx>
UploadBase::detectScript: checking for embedded scripts and HTML stuff
UploadBase::detectScript: no scripts found
UploadBase::detectVirus: virus scanner disabled
[Mime] MimeAnalyzer::doGuessMimeType: analyzing head and tail of /tmp/phpBHWM00 for magic numbers.
[Mime] MimeAnalyzer::doGuessMimeType: ZIP signature present in /tmp/phpBHWM00
[Mime] MimeAnalyzer::detectZipType: unable to identify type of ZIP archive
[Mime] MimeAnalyzer::guessMimeType: guessed mime type of /tmp/phpBHWM00: application/zip
[Mime] MimeAnalyzer::improveTypeFromExtension: improved mime type for .pptx: application/zip
UploadBase::verifyExtension: mime type application/zip mismatches file extension pptx, rejecting file
Anyone has any success to use this configuration: $wgMimeDetectorCommand = "file -bi"; ?
Thanks,
Thai N.