Show More
@@ -140,6 +140,6 b' def get_file_mimetype(file) -> str:' | |||||
140 | file_type = magic.from_buffer(file.chunks().__next__(), mime=True) |
|
140 | file_type = magic.from_buffer(file.chunks().__next__(), mime=True) | |
141 | if file_type is None: |
|
141 | if file_type is None: | |
142 | file_type = 'application/octet-stream' |
|
142 | file_type = 'application/octet-stream' | |
143 |
el |
|
143 | elif type(file_type) == bytes: | |
144 | file_type = file_type.decode() |
|
144 | file_type = file_type.decode() | |
145 | return type |
|
145 | return file_type |
General Comments 0
You need to be logged in to leave comments.
Login now