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

Docx content type recognition #168

Open
nektarios-workable opened this issue Aug 11, 2022 · 1 comment
Open

Docx content type recognition #168

nektarios-workable opened this issue Aug 11, 2022 · 1 comment

Comments

@nektarios-workable
Copy link

Hi, I'm using mimemagic to recognise the mimetype of files and in case of docx files what is returned as type in some cases is application/zip. I found here the suggestion to put the following: MimeMagic.add('application/vnd.openxmlformats-officedocument.wordprocessingml.document', magic: [[0..2000, 'word/']]) in the config/initializers/mime_types.rb file. The thing is, can someone explain what is this magic: [[0..2000, 'word/']] magic specification? What does it mean? What is it doing?

@blasterpal
Copy link

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