Re: [Mediawiki-l] XLS file upload problem
by Sullivan, James (NIH/CIT) [C]
I run into this all the time with xls, and ppt files as well. Its due to the mime encoding in the files, which Mediawiki compares with in its list of mime types in the file includes/mime.types. I'm not sure if this is a problem on Microsoft's end or with Mediawiki but the fix is pretty simple. To fix the problem modify the includes/mime.types file by adding "xls" to the line:
Also, I set the following in LocalSettings.php, which is recommended by Mediawiki for proper mime type detection:
$wgMimeDetectorCommand = "file -bi";
but I still need to modify the mime.types file. Also, remember you'll need to modify mime.types whenever you update Mediawiki in the future.
Hope this helps...
From: mediawiki-l-bounces(a)lists.wikimedia.org [mediawiki-l-bounces(a)lists.wikimedia.org] On Behalf Of Dave Sigafoos [davesigafoos(a)sanmar.com]
Sent: Monday, December 22, 2008 5:39 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] (no subject)
* MediaWiki <http://www.mediawiki.org/> : 1.10.0
* PHP <http://www.php.net/> : 5.2.0-8+etch11 (apache2handler)
* MySQL <http://www.mysql.com/> : 5.0.32-Debian_7etch6-log
I have modified localsettings to allow XLS files but for some reason I
'The file is corrupt or has an incorrect extension. Please check the
file and upload again.'
My current setting looks like
$wgFileExtensions =3D array( 'xls','txt', 'sql', 'png', 'gif',
'jpg','jpeg', 'doc', 'mp3', 'bmp');
They all appear to work correctly except for xls.
Not that I like the idea of having XLS in the database .. but users seem
to think it is something they need. It will last for a short period of
time then I can lock it down and delete them.
David Tod Sigafoos | SANMAR Corporation
MediaWiki-l mailing list