https://bugzilla.wikimedia.org/show_bug.cgi?id=26367
--- Comment #3 from Neil Kandalgaonkar <ne...@wikimedia.org> 2010-12-21 01:02:22 UTC --- Great work Thomas -- however it seems that other lines in the file follow the same convention. Perhaps the intention is to create equivalency between a list of mimetypes and a list of extensions, and one is supposed to just intuit that a mimetype has a slash and an extension doesn't. This might be a bug in MimeMagic -- if you want to look into it further, that would be awesome, but I'm going to look into it anyway if you don't have the time. (In reply to comment #1) > I tracked the problem down a bit, and it seems to be a problem in > includes/MimeMagic.php. > > MimeMagic has a list of predefined mime types, with assorted file extensions. > The code that parses the types treats everything up to the first space as the > mime type, everything behind that as a file extension. As you can see from the > diff below, the svg line does not follow this convention, leading to an > extension of "image/svg". > This blows up in UploadStash. > > With the change below, I can upload svg files again. But I'm not sure what the > correct fix is here, as this particular line is in the code since r21411, from > April 2007. > > --- a/includes/MimeMagic.php > +++ b/includes/MimeMagic.php > @@ -41,7 +41,7 @@ image/x-bmp bmp > image/gif gif > image/jpeg jpeg jpg jpe > image/png png > -image/svg+xml image/svg svg > +image/svg+xml svg > image/tiff tiff tif > image/vnd.djvu image/x.djvu image/x-djvu djvu > image/x-portable-pixmap ppm -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l