Last modified: 2014-02-15 14:05:38 UTC
Created attachment 9803 [details] fresh OpenDocument database When uploading on opendocument database, it is recognized as application/acad type. finfo does not recognize the type using magic.mime which return application/octet-stream. MediaWiki thus tries to guess the file content according to its extension. With upload stash, the temporary file does not have any file extension (the path is something like 'mwrepo://local/temp/4/46/20120104160114!phpFfHK5z.'), hence the detection gives unknown/unknown and then default to application/acad (the first one in our list). The attached file is an empty opendocument database file. Analyzing it with File::getPropsFromPath() yield : Array ( [fileExists] => 1 [mime] => application/vnd.oasis.opendocument.database [media_type] => OFFICE [metadata] => [sha1] => 5tlzupz0ww3q8w9pkowrdq72g0wnsqa [width] => 0 [height] => 0 [bits] => 0 [file-mime] => unknown/unknown [minor_mime] => vnd.oasis.opendocument.database [major_mime] => application [size] => 2498 ) Please note how 'mime' is correct but 'file-mime' is incorrect :-(
http://test2.wikipedia.org/w/index.php?title=Special:Upload