As a workaround you can try modifying includes/mime.types and add the line:
application/x-zip oxt
since I don't see a application/x-zip line in the version 1.15.1 mime.types file, in which case you could just add "oxt" to the line.
This will fool Mediawiki into matching the x-zip mime type with the "oxt" extension and allow the upload.
-jim ---------------------------- ------------------------------------------- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Paul C Lustgarten Sent: Tuesday, September 08, 2009 10:42 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] MediaWiki and Mimetypes problems
Clayton,
I think the problem is in "file", not the wiki nor anything you've done to it. :-)
Specifically, you say that a "file -bi" reports those files as being application/x-zip. If I correctly recall some similar struggles I've had, that's the place to focus - convince "file" that what it is *really* is the MIME type for oxt.
Paul
On Sep 8, 2009, at 10:29 AM, ccornell - OpenOffice.org wrote:
I've been trying to fix this one on the OpenOffice.org Wiki for a while, but am getting nowhere... maybe someone here has an idea?
I've defined these mime types in both the apache2/conf/mime.types file and in the wiki/includes/mime.types file:
application/vnd.oasis.opendocument.chart odc application/vnd.oasis.opendocument.chart-template otc application/vnd.oasis.opendocument.database odb application/vnd.oasis.opendocument.formula odf application/vnd.oasis.opendocument.formula-template otf application/vnd.oasis.opendocument.graphics odg application/vnd.oasis.opendocument.graphics-template otg application/vnd.oasis.opendocument.image odi application/vnd.oasis.opendocument.image-template oti application/vnd.oasis.opendocument.presentation odp application/vnd.oasis.opendocument.presentation-template otp application/vnd.oasis.opendocument.spreadsheet ods application/vnd.oasis.opendocument.spreadsheet-template ots application/vnd.oasis.opendocument.text odt application/vnd.oasis.opendocument.text-master odm application/vnd.oasis.opendocument.text-template ott application/vnd.oasis.opendocument.text-web oth application/vnd.openofficeorg.extension oxt
These should be correctly defined according to the standards outlined here: http://www.iana.org/assignments/media-types/
These file extensions are also defined in the $wgFileExtensions variable in LocalSettings.php.
This seems to be working except for the OXT definition - the last one. When a Wiki user attempts to upload an OXT file to the Wiki they get an error message: ============ The file is corrupt or has an incorrect extension. Please check the file and upload again. ============
I've checked the file with file -bi and it returns application/x-zip. Since this does not match what the file really is (ie application/vnd.openofficeorg.extension) then the error is returned.
So, my question is... what needs to be done to convince the Wiki that the OXT file is really application/vnd.openofficeorg.extension? Is this an error in the creation of the OXT file? or possibly something I've done wrong on the Wiki admin side? or... ??
C.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
______________ Paul C Lustgarten Tools & Incubation AT&T Labs - Research Florham Park, NJ +1 973 360 7206
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l