Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13506

"Enlarge your mime_type" : the field in the ezbinaryfile database table (varchar(50)) is too short for Office 2007 MIME content-type strings

    XMLWordPrintable

Details

    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).

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            rba_ic rba_ic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: