Re: XLS file upload problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: XLS file upload problem

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:

application/msword

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...

-Jim
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Dave Sigafoos [[hidden email]]
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
continually get



'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.



TIA

DSig
David Tod Sigafoos | SANMAR Corporation







_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: XLS file upload problem

Dave Sigafoos
Jim,

Thanks for that ... it worked great.

Now if I could get the users to understand.

Have a great holiday season

DSig
David Tod Sigafoos | SANMAR Corporation
PICK Guy
206-770-5585
[hidden email]

 


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Sullivan,
James (NIH/CIT) [C]
Sent: Tuesday, December 23, 2008 6:06
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] XLS file upload problem


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:

application/msword

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...

-Jim
________________________________________
From: [hidden email]
[[hidden email]] On Behalf Of Dave Sigafoos
[[hidden email]]
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
continually get



'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.



TIA

DSig
David Tod Sigafoos | SANMAR Corporation







_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l