utils: read full file when trying do detect mime-type
This commit is contained in:
parent
628a1d01ec
commit
3fe8f31aa9
|
@ -34,7 +34,7 @@ def file_match_mime_types(file_like, mime_types):
|
|||
|
||||
if not mime_types:
|
||||
return True
|
||||
mime_type = magic.from_buffer(file_like.read(10024), mime=True)
|
||||
mime_type = magic.from_buffer(file_like.read(), mime=True)
|
||||
return match_mime_types(mime_type, mime_types)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue