forked from LBRYCommunity/lbry-sdk
fix: extension check
disregard the first period, otherwise the `filename.` test fails.
This commit is contained in:
parent
eb2cd8fec1
commit
021e30ffde
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ types_map = {
|
|||
def guess_media_type(path):
|
||||
_, ext = os.path.splitext(path)
|
||||
extension = ext.strip().lower()
|
||||
if extension:
|
||||
if extension[1:]:
|
||||
if extension in types_map:
|
||||
return types_map[extension][0]
|
||||
return f'application/x-ext-{extension[1:]}'
|
||||
|
|
Loading…
Reference in a new issue