Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
3.9.4, 4.0.0
-
None
-
Operating System: Debian Etch
PHP Version: PHP 5.2.0-8+etch7
Database and version: 5.0.32-Debian_7etch1-log
Browser (and version):
Description
Summary :
The current max length of the "mime_type" of the "ezbinaryfile" database table is 50 characters.
Some vendor specific MIME content types might be longer : it's the case with Microsoft Office 2007 documents'.
Here's some of the "official" MIME content types of Microsoft Office 2007 documents :
docx application/vnd.openxmlformats-officedocument.wordprocessingml.document (71 characters)
[...]
pptx application/vnd.openxmlformats-officedocument.presentationml.presentation (73 characters)
Source : http://blogs.msdn.com/dmahugh/archive/2006/08/08/692600.aspx
If you modify the $QuickMIMETypes array in lib/ezutils/classes/ezmimetype.php to take those mime types into account (**), a Word 2007 document (.docx) will be recognized as so, but its entry in the ezbinary file table won't be correct, with a reported MIME Content-Type ( mime_type field ) of " application/vnd.openxmlformats-officedocument.pres".
I have not done thorough tests, but it could lead to problems under certain conditions (webdav ? content import/export ? antivirus solutions being picky over an unknown MIME type content/download'ed file or "MIME multipart" mailed file ?)
(**) I know that the ability to add new (file extension / content types) match rules in a mime.ini file will be available in 4.1 (without the need to touch lib/ezutils/classes/ezmimetype.php ) : see http://issues.ez.no/010424
People will then more than likely add Office 2007 MIME content types in order to be able to choose specific mime types icons (in icon.ini).