It turns off mime type checking. I believe you can then upload anything that has an extension listed in $wgFileExtensions, which is why I remove it only temporarily since it opens a security hole (e.g., uploading a malicious zip file masquerading as a png file).
-Jim
-----Original Message----- From: Charlie Markwick [mailto:charlie-markwick@southcot.com] Sent: Thursday, January 06, 2011 11:04 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Upload Problem
Jim
Thanks for this what impact does $wgVerifyMimeType = false have?
Charlie
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Sullivan, James (NIH/CIT) [C] Sent: 06 January 2011 15:39 To: 'MediaWiki announcements and site admin list' Subject: Re: [Mediawiki-l] Upload Problem
I have tried many ways to get around this problem unsuccessfully and am very glad to hear it (may) be fixed in 1.17. If you do find a solution please post it. One thing to note, if you save a file in Office7 as a "doc" file, instead of "docx", it is still going to have the docx mime type (zip).
For now I suggest to my users to do one of the following to get their Office7 documents into the wiki:
1) Save the document as a PDF, then upload the PDF file. 2) Contact me about uploading and I will temporarily turn off mime type checking ($wgVerifyMimeType = false in LocalSettings.php).
I prefer method (1) since Office files, when selected by a wiki user, open in an Office application, like Word, which is an editor. It is tempting for users to make edits and then save thinking that it will save back to the wiki when in reality they must save to their computer and then upload it to the wiki. A PDF file will open in an adobe reader eliminating any confusion about editing the document.
-Jim
-----Original Message----- From: Charlie Markwick [mailto:charlie-markwick@southcot.com] Sent: Thursday, January 06, 2011 10:18 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Upload Problem
I have removed the extra entries in mime.info and mime.types. I have changed to:-
$wgFileExtensions = array('png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'ps', 'pps');
I've saved the document in Word .doc format and using the markup:-
[[File:AgreementV2.doc]]
Gives me the same error:-
"File extension does not match MIME type."
Charlie
MediaWiki v1.16.0, PHP v5.2.6 and MySQL v5.0.77 Apache v1.3.41
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l