WordPress serves up wrong MIME type for Office 2007 downloads
|Reported by:||LafayetteNuke||Owned by:||ryan|
When serving up hosted files for download, WordPress assigns the wrong MIME type for Office 2007. For example, docx files are served up as "application/msword" instead of "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
As a result, browsers end up interpreting the files in different ways. Some, like IE8 on Windows 7 or Safari on Mac OS X 10.6, will add a ".doc" to the end of the file name. Others (Firefox, Chrome) will see the Office 98-2003 MIME type, but keep the existing file name. The iPad displays a "Unknown file type" error. The issue is not limited to Word 2007 files however; all Office 2007 files (pptx, xlsx) appear to have the same issue.
There is a forum discussion for this issue:
It's possible this bug was introduced here:
The proposed change is to tweak the MIME declarations in wp-includes/functions.php to reflect the proper MIME type information.
Change History (18)
comment:12 @SergeyBiryukov — 3 years ago
- Component changed from Filesystem to Media
- Milestone changed from Future Release to 3.5