This commit is contained in:
jonaswinkler
2020-12-02 18:00:49 +01:00
parent e3ce573fbb
commit 4548cf08c7
2 changed files with 26 additions and 2 deletions

View File

@@ -51,7 +51,11 @@ def get_default_file_extension(mime_type):
if mime_type in supported_mime_types:
return supported_mime_types[mime_type]
return None
ext = mimetypes.guess_extension(mime_type)
if ext:
return ext
else:
return ""
def is_file_ext_supported(ext):