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

Default mime type to application/octet-stream for unrecognized file types #227

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

ginazhouhuiwu
Copy link
Contributor

Set the default file type instead of throwing an exception for unrecognized file types. Used in nerfstudio-project/nerfstudio#3220 in order to directly download .ply files.

@ginazhouhuiwu ginazhouhuiwu changed the title Default mime type to application/octet-stream if cannot guess Default mime type to application/octet-stream for unrecognized file types Jun 24, 2024
Copy link
Collaborator

@brentyi brentyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ginazhouhuiwu!! While we're at it, can we add the same logic here?

"Content-Type": str(mimetypes.MimeTypes().guess_type(relpath)[0]),

@brentyi brentyi merged commit 8d690da into main Jun 25, 2024
9 checks passed
@brentyi brentyi deleted the gina/mime_type branch June 25, 2024 05:07
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.

2 participants