MS Word 2007 .DOCX MIME TYPE

June 23, 2009

Ever searched around looking for the mime-type for the newer Microsoft Word .docx file type?  Search no more. It comes in handy for web development when you have an uploader app in PHP or ASP and need to determine the file type. Tested in PHP and works perfect. Hope this saves someone some time searching.

.docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document

.doc (old school word)
application/msword

23 Responses to “MS Word 2007 .DOCX MIME TYPE”

  1. Tnx man…
    Here are more MIME type for Office 2007
    XLSX application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    PPTX application/vnd.openxmlformats-officedocument.presentationml.presentation

  2. Thanks for this mimetype, it works well on Safari, Firefox but … it doesn’t work for me on Internet Explorer 8 !!
    It’s seems that IE give wrong FileInfo…
    The mimetype that works for me (to upload DOCX) is :
    ‘application/x-zip-compressed’
    I know : this seems to be a zip archive mimetype, but DOCX file IS ACTUALLY a compressed folder of xml files.
    I found that because I’m working with Symfony PHP Framework that bring solid validators to filter the files to be uploaded. So, when the mimetype is wrong, the file isn’t uploaded …
    Hope this help someone.
    Flho

Leave a Reply