MS Word 2007 .DOCX MIME TYPE

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

18 Comments

  1. Aric says:

    Amen brother, amen.

  2. Hemanth says:

    Thanks Matthew. That helps.

  3. Simon says:

    Alleluila! Thanks dude!

  4. Most Grateful says:

    This saved me from a huge crisis as students were uploading and I had not controlled for docx in my php app. I plunked this in and you saved my day!

    Many, many thanks,

    Henry

  5. Arturo says:

    Very usefull man, I needed for an ASP.NET proyect at work.

    Thx

  6. IsabelleGusse says:

    THX DUDE !

  7. Fedja says:

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

  8. maurice says:

  9. Tommy says:

    Hi!
    I used a mail sender script with your mime type, it worked flawlessly.
    Thanks mate.

  10. Flho says:

    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

  11. Anupam says:

    thanks dude,

  12. Eagleweb says:

    Thanks. It's great your answer is at the top of the search engines.
    Short and to the point!

  13. murs says:

    saved my ass, thnx!

  14. Amos says:

    Thanks.
    It's useful.

  15. samir delvira says:

    Thank you
    its working perfectly, those mime types are right :)

  16. John says:

    Much appreciated!

  17. Arpan says:

    How can i show the content of a docx file on the browser.(without download)

  18. Aftab Alam says:

    Thanks Matthew .
    Came really handy !!

Leave a Comment

  • Social

  • Tweets

    Follow
  • Categories

  • FACEBOOK

  • The past

Request a Quote

Close










  • Web
  • SEO
  • Identity
  • Print
  • Consulting
  • Mobile Development
  • Tradeshow Booth


Or call us now - 801-545-0410