Mime type of .docx files is being misidentified as application/zip
See original GitHub issueWhen I set up file type restrictions, that included application/vnd.openxmlformats-officedocument.wordprocessingml.document
, I was not able to upload a .docx
file. After some debugging I figured out that the logic in file-type/index.js
seems to be identifying the mime type of docx files as application/zip
, which is incorrect.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
DOCX File type in PHP finfo_file is application/zip
This causes a problem when uploading files to services that enforce matching file extension and MIME type. For example, Mediawiki-based wikis (written using...
Read more >Uploading MS Word files doesn't work ("File extension does ...
File extension ".doc" does not match the detected MIME type of the file (application/zip). I tried removing "doc" from application/msword in ...
Read more >Forcing apache to send correct Content-Type for docx files
Problem identified and resolved. The files in question were being downloaded via a custom application which sets its own Content-Type ...
Read more >Wrong MIME type - Microsoft Community
Both .doc and .dotx files being saved out of Word for Mac have the same MIME type. Template files should be ... MIME...
Read more >Fix mime type for attachment file uploads. - Jira - Atlassian
CONFSERVER-17718 - Downloading a .docx file in IE7/WinXP gives it a .zip ... PDF attachments with uppercase extension have wrong content type in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We were thinking of just going back to replying on system extension reporting, but adding extra checks when its incorrect, like with some video files on a Mac. Do you have a suggestion on this?
@arturi thanks for the reply. Are you by any change going to check the file extension instead?