Last modified: 2010-05-15 15:48:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10791, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8791 - PNG images cannot be uploaded
PNG images cannot be uploaded
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.9.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-26 22:59 UTC by jeremybuchmann
Modified: 2010-05-15 15:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description jeremybuchmann 2007-01-26 22:59:31 UTC
PNG images are prevented from being uploaded.  Other image formats work fine. 
The error message is:

Upload warning
The file is corrupt or has an incorrect extension. Please check the file and
upload again.


My $wgFileExtensions looks like:

$wgFileExtensions = array('jpg','png','jpeg','gif','ogg','doc','xls','ppt','mp3'
,'odt','ods','pdf');


The problem seems to stem from the following line in the verify() function in
includes/SpecialUpload.php:

$mime= $magic->guessMimeType($tmpfile,false);

$mime comes back as "text/plain" which doesn't match the extension "png".
Comment 1 jeremybuchmann 2007-01-26 23:00:18 UTC
I should add that this is on Fedora Core 6.
Comment 2 Daniel Kinzler 2007-01-26 23:03:39 UTC
Please read the FAQ before filing bug reports - see
http://www.mediawiki.org/wiki/FAQ#.22File_is_corrupt_or_has_an_invalid_extension.22

The cause is mostly likely a misconfigured php module.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links