Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please upgrade file version (e.g. better docx detection) #160

Open
antoinep92 opened this issue Aug 2, 2021 · 2 comments
Open

Please upgrade file version (e.g. better docx detection) #160

antoinep92 opened this issue Aug 2, 2021 · 2 comments

Comments

@antoinep92
Copy link

We had a bug where a file upload was rejected by our backend, and tracked it down to mmmagic classifying a docx file uploaded by a user as application/octet-stream, while my system's file command correctly detects it.

There are two things here:

  • If I use the MAGIC_CONTINUE flag, it returns [ '', 'application/zip', 'application/octet-stream; charset=binary' ], so when not using this flag one could expect application/zip, but we get application/octet-stream which is both less specific and appears later in the list, so it seems a bit strange to me. Don't know if it's the upstream file behaviour or if there's something wrong with the js code here.
  • It would be great if you could upgrade the file version distributed here. Currently it's 5.32 and I have 5.40 installed on my system. Apparently the docx detection got better, and I guess a bunch of other improvements too. I don't know if the build changes much between releases, but hopefully it's just a version bump ?

It so happens that the file is publicly available, which allows me to share it : https://www.hetsl.ch/cv/romain-bertrand/cv.docx

@ssinghi
Copy link

ssinghi commented Aug 7, 2024

hi @antoinep92 how did you work around this issue, if at all?

@antoinep92
Copy link
Author

I don't remember for this specific issue, but we switched to wasmagic, you could try it and see if it works better for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants