Отсюда: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
$wgAllowJavaUploads = true;
This setting can be used as a work around for allowing minetypes to be accepted indiscriminately. For example, if you attempt to upload a .doc file created by Word 2007, no matter the ext list you provide and mimetype checking you invoke or prohibit, you will receive the message:
The file is a corrupt or otherwise unreadable ZIP file. It cannot be properly checked for security.
.doc files saved by Word 2007 (and possibly later versions) contain a small embedded ZIP archive storing metadata that is not representable in the binary .doc format as used by earlier versions of Word. This embedded ZIP data confuses the Java archive scanner, causing the .doc file to be rejected. Files in the newer .docx file format are valid ZIP archives in their entirety, and can be uploaded successfully without setting $wgAllowJavaUploads.
$wgAllowJavaUploads = true;
This setting can be used as a work around for allowing minetypes to be accepted indiscriminately. For example, if you attempt to upload a .doc file created by Word 2007, no matter the ext list you provide and mimetype checking you invoke or prohibit, you will receive the message:
The file is a corrupt or otherwise unreadable ZIP file. It cannot be properly checked for security.
.doc files saved by Word 2007 (and possibly later versions) contain a small embedded ZIP archive storing metadata that is not representable in the binary .doc format as used by earlier versions of Word. This embedded ZIP data confuses the Java archive scanner, causing the .doc file to be rejected. Files in the newer .docx file format are valid ZIP archives in their entirety, and can be uploaded successfully without setting $wgAllowJavaUploads.
Комментариев нет:
Отправить комментарий