Hi,
When I try to upload a word file (extension .doc) , I always get the error : /The file is //corrupt or has an incorrect extension. Please check the file and upload// gain. (Ce fichier est corrompu, a une taille nulle ou possède une extension invalide. Veuillez vérifer le fichier)
/In file LocalSettings.php : $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'doc', 'zip' ). The files are not corrupt, have the good extension, .... I'm using Mediawiki version 1.10.0
Thank you for your help, Evelyne
Evelyne Cangini wrote :
Hi,
When I try to upload a word file (extension .doc) , I always get the error : /The file is //corrupt or has an incorrect extension. Please check the file and upload// gain. (Ce fichier est corrompu, a une taille nulle ou possède une extension invalide. Veuillez vérifer le fichier)
/In file LocalSettings.php : $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'doc', 'zip' ). The files are not corrupt, have the good extension, .... I'm using Mediawiki version 1.10.0
*just for testing* : try to put
$wgVerifyMimeType = false;
at the end of LocalSettings.php and then try to upload again.
Alexis Moinet a écrit :
Evelyne Cangini wrote :
Hi,
When I try to upload a word file (extension .doc) , I always get the error : /The file is //corrupt or has an incorrect extension. Please check the file and upload// gain. (Ce fichier est corrompu, a une taille nulle ou possède une extension invalide. Veuillez vérifer le fichier)
/In file LocalSettings.php : $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'doc', 'zip' ). The files are not corrupt, have the good extension, .... I'm using Mediawiki version 1.10.0
*just for testing* : try to put
$wgVerifyMimeType = false;
at the end of LocalSettings.php and then try to upload again.
Thank you very much. It's right !
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
*just for testing* : try to put
$wgVerifyMimeType = false;
at the end of LocalSettings.php and then try to upload again.
Thank you very much. It's right !
That just tells it not to check if the file's contents matches its extension. It seems MediaWiki doesn't know how to recognise .doc files, I'm not sure how to fix that.
Thomas Dalton wrote :
That just tells it not to check if the file's contents matches its extension. It seems MediaWiki doesn't know how to recognise .doc files, I'm not sure how to fix that.
Since I can upload doc files on my wiki without any problem, it seems more probable to me that she has a problem with incorrect mime type (silently corrupted files) or some server-related configuration, but I don't think it's a mediawiki-related problem.
Don't know how to fix that either, using $wgVerifyMimeType = false; is very insecure according to mediawiki.org : (see http://www.mediawiki.org/wiki/Manual:Mime_type_detection)
On 05/09/07, Thomas Dalton thomas.dalton@gmail.com wrote:
That just tells it not to check if the file's contents matches its extension. It seems MediaWiki doesn't know how to recognise .doc files, I'm not sure how to fix that.
Correct.
The "fix" is to instruct MediaWiki to use an appropriate tool to perform the detection; the "file" command under Unix/Linux, for instance. Not sure what equivalents are available on Windows, if that's in use.
Rob Church
mediawiki-l@lists.wikimedia.org