Last modified: 2012-02-22 18:30:37 UTC
When using "Source URL" "sideloading" to upload a file using the file's URL, if the file name contains URL-encoded characters, the warning "File extension does not match MIME type." is given. Removing the URL-encoded characters from the file name allows the upload to proceed, but the checkbox "Ignore any warnings" does not work. I discovered the bug with this file, which has an URL encoded comma %2C after the word "Park": http://commons.wikimedia.org/wiki/File:Gyps_rueppellii_-Nairobi_National_Park,_Kenya-8-4c.jpg I'm not sure how this should be solved, since I don't know what characters are not allowed in a file name, if any. It may depend on the system. It might be a good idea to strip out characters that are allowed in URLs, but not in file names.
I increased this from "normal" to "critical" since there is no workaround for it. Users will always receive this error when they try to upload something with url-encoding (which is almost everything these days). This feature essentially does not work most of the time, at this point.
@Badon:The problem is not in characters of the file.. *The Problem is in Guessing of Mime Type In function verifyFile,the following code guesses the mime type $var = FSFile::getPropsFromPath(temppath and extension) Case1:When i upload images from google image search for example - http://www.hollywoodreporter.com/sites/default/files/2011/05/googlelogoa_a_l.jpg '''$var contains the right MIME Type''' Case2:When i upload a pic from wikipedia http://commons.wikimedia.org/wiki/File:Gyps_rueppellii_-Nairobi_National_Park,_Kenya-8-4c.jpg $var contains *WRONG* MIME Type.It contains MIME type of text/html(The same error comes when we try to upload a html page)which is blacklisted by default. I think it is interpreting these kinds of images as HTML pages
http://commons.wikimedia.org/wiki/File:Gyps_rueppellii_-Nairobi_National_Park,_Kenya-8-4c.jpg The above link is of a html page.The link for image is http://upload.wikimedia.org/wikipedia/commons/3/33/Gyps_rueppellii_-Nairobi_National_Park%2C_Kenya-8-4c.jpg Which works fine..so I guess this is not a bug at all
Thanks for checking into that. It looks like I reported this bug before I understood the difference between a file page and the actual file. I marked the bug as invalid.