detect ftypiso5 as mp4 mime type

This commit is contained in:
CorePoint 2020-02-07 12:10:38 +01:00 committed by GitHub
parent af6eff9ff8
commit 72e104b145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ def get_mime_type(content: bytes) -> str:
if content[0:4] == b'\x1A\x45\xDF\xA3': if content[0:4] == b'\x1A\x45\xDF\xA3':
return 'video/webm' return 'video/webm'
if content[4:12] in (b'ftypisom', b'ftypmp42'): if content[4:12] in (b'ftypisom', b'ftypiso5', b'ftypmp42'):
return 'video/mp4' return 'video/mp4'
return 'application/octet-stream' return 'application/octet-stream'