mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-12 10:34:32 +08:00
fixed support for flac files
This commit is contained in:
parent
6fa0fe9709
commit
0bde0f1f03
@ -40,7 +40,9 @@ def encode_url_or_file_to_base64(path):
|
||||
def get_mimetype(filename):
|
||||
mimetype = mimetypes.guess_type(filename)[0]
|
||||
if mimetype is not None:
|
||||
mimetype = mimetype.replace("x-wav", "wav")
|
||||
mimetype = mimetype.replace(
|
||||
"x-wav", "wav").replace(
|
||||
"x-flac", "flac")
|
||||
return mimetype
|
||||
|
||||
def get_extension(encoding):
|
||||
|
Loading…
Reference in New Issue
Block a user