Commit Graph

5 Commits

Author SHA1 Message Date
Mikael Nordfeldth 6faed0e451 MediaFile loses dependency on PEAR::MIME
At the same time we remove the "filecommand" setting, since we will
likely not have use of it thanks to PECL fileinfo.

Also the "supported" list for attachment mime types has changed
format, so we can keep track of at least some known file extensions.
2014-03-08 03:34:50 +01:00
Mikael Nordfeldth 6f6065e5e9 Only accept filenames for existing files in getUploadedFileType
Getting metadata from filehandles just meant duplicating work
2014-03-08 01:42:24 +01:00
Mikael Nordfeldth 633191d808 Making sure scripts and tests check for GNUSOCIAL defined (instead of STATUSNET)
Orbited plugin may not work at all anymore, I had no means to try it.
But there's a check whether 'LACONICA' is defined there, which is a
very unlikely thing in the future. So far only tests and scripts have
been migrated consistently, though.
2013-09-28 15:20:10 +02:00
Brion Vibber 9c7b66984c Enhanced upload file type detection. If given an original filename, we'll attempt to detect type from the extension if we were unable to make a definitive match from content. Generic octet-stream, zip, and MS Office type are explicitly singled out for re-checks, which fixes OpenOffice and MS Office documents to come up with the proper types when misdetected.
File extensions can also be added to the upload type whitelist; they'll be normalized to types for the actual comparison, so only known extensions will work.
2010-06-28 08:59:47 -07:00
Brion Vibber 41d81b996f Test cases for MediaFile::getUploadedFileType() with OpenOffice, MS Office, and PDF sample files (as saved from OpenOffice 3.2)
Only 3 of 16 cases pass on my dev box with default config. Ouch!
2010-06-28 08:59:46 -07:00