Skip to content

Commit

Permalink
really really fix get_mimetype_from_extension() this time
Browse files Browse the repository at this point in the history
  • Loading branch information
tykling committed Dec 3, 2024
1 parent 1460da4 commit bc33760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_extension_from_mimetype(mimetype: str) -> str:

def get_mimetype_from_extension(extension: str) -> str | None:
"""Return mimetype for the extension using pythons mimetypes module."""
mimetype, _encoding = mimetypes.guess_type(url=f"foo.{extension}")
mimetype, _encoding = mimetypes.guess_type(url=f"foo.{extension}", strict=False)
return mimetype


Expand Down

0 comments on commit bc33760

Please sign in to comment.