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

application/octet-stream with text files on windows #275

Open
prchristie opened this issue Jul 7, 2022 · 1 comment
Open

application/octet-stream with text files on windows #275

prchristie opened this issue Jul 7, 2022 · 1 comment

Comments

@prchristie
Copy link

On Windows 10 a plain text buffer is classified as application/octet-stream which is indicative of a binary file (I think). Ubuntu Linux is correctly identifying as "text/plain".

Python3.9, python-magic-bin as the driver for magiclib

How to reproduce

content = "Bunch of fake content" * 8192

magic = Magic(mime=True)
mimetype = magic.from_buffer(content[0:8192]) # Index to replicate my environment
@zwnk
Copy link

zwnk commented Apr 19, 2023

I have the exact same issue. With Ubuntu it gives me the correct file type, Windows its always application/octet-stream.

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