Fix mimetype error

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
lzzy12 2019-12-23 16:29:20 +05:30
parent bb30cc7f11
commit 01ed02e57c

View File

@ -38,7 +38,7 @@ def tar(orig_path: str):
def get_mime_type(file_path): def get_mime_type(file_path):
mime_type = mimetypes.guess_type(file_path).mime_type mime_type = mimetypes.guess_type(file_path)[0]
mime_type = mime_type if mime_type else "text/plain" mime_type = mime_type if mime_type else "text/plain"
return mime_type return mime_type