Skip to content

Conversation

@longshuicy
Copy link
Member

No description provided.

@longshuicy longshuicy linked an issue Sep 2, 2022 that may be closed by this pull request
if content_type is None:
content_type = mimetypes.guess_type(file_db.name)
content_type = content_type[0] if len(content_type) > 1 else content_type
content_type = content_type[0] if len(content_type) > 1 else content_type
Copy link
Member Author

@longshuicy longshuicy Sep 2, 2022

Choose a reason for hiding this comment

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

we should use content type as it is if it's being passed in; only do content_type[0] when guess from filename which is in tuple format in that case e.g. (application/json, filename?)

Copy link
Contributor

@tcnichol tcnichol left a comment

Choose a reason for hiding this comment

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

Marking approved for this. Works.

@longshuicy longshuicy self-assigned this Sep 6, 2022
@max-zilla max-zilla merged commit 97e129a into main Sep 6, 2022
@max-zilla max-zilla deleted the 79-content-type-not-showing-correctly branch September 6, 2022 17:14
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.

Content type not showing correctly

4 participants