Update mime_types.py

This commit is contained in:
Thomas Zarebczan 2019-02-20 18:41:27 -05:00 committed by Jack Robison
parent 673b958020
commit 2a82ff7cc5
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -155,6 +155,6 @@ types_map = {
def guess_media_type(path):
_, ext = os.path.splitext(path)
return types_map.get(
ext,
ext.strip().lower(),
'application/octet-stream' if not (ext and ext[1:].strip()) else f'application/x-ext-{ext[1:].strip().lower()}'
)