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

Guess file content type when not specified #655

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

kujenga
Copy link
Contributor

@kujenga kujenga commented Jan 2, 2025

This commit improves the default content type behavior for this library by guessing the correct mime type when one is not provided. This improves the accuracy of the default behavior in representing the files and matches other fsspec implementations.

Closes #654

This commit improves the default mime type behavior for this library by
guessing the correct mime type when one is not provided. This improves
the accuracy of the default behavior in representing the files and
matches other fsspec implementations.

Closes fsspec#654
@kujenga kujenga force-pushed the at/mime-type-guess branch from 1816f21 to df58ae8 Compare January 2, 2025 21:54
@kujenga kujenga changed the title guess mime type when not specified Guess file content type when not specified Jan 2, 2025
@martindurant
Copy link
Member

I must admit to not being particularly fond of this kind of guessing, but since the user can always override, I suppose it's OK.

@martindurant martindurant merged commit f978106 into fsspec:main Jan 6, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

Guess correct mimetype instead of defaulting to application/octet-stream
2 participants