forked from LBRYCommunity/lbry-sdk
consider . extension
This commit is contained in:
parent
43b372c0fe
commit
652d7cbd24
1 changed files with 1 additions and 1 deletions
|
@ -154,5 +154,5 @@ types_map = {
|
|||
|
||||
def guess_media_type(path):
|
||||
_, ext = os.path.splitext(path)
|
||||
default = 'application/octet-stream' if not ext else f'application/x-ext-{ext[1:].strip().lower()}'
|
||||
default = 'application/octet-stream' if not (ext and ext[1:].strip()) else f'application/x-ext-{ext[1:].strip().lower()}'
|
||||
return types_map.get(ext, default)
|
||||
|
|
Loading…
Reference in a new issue