mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 03:49:16 +02:00
Fix #857: Fix broken upload for specific files when using S3 storage
This commit is contained in:
parent
d52e804a3c
commit
0a25243e25
3 changed files with 11 additions and 1 deletions
|
@ -12,7 +12,7 @@ def guess_mimetype(f):
|
|||
t = magic.from_buffer(f.read(b), mime=True)
|
||||
if not t.startswith("audio/"):
|
||||
# failure, we try guessing by extension
|
||||
mt, _ = mimetypes.guess_type(f.path)
|
||||
mt, _ = mimetypes.guess_type(f.name)
|
||||
if mt:
|
||||
t = mt
|
||||
return t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue