diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 13:49:30 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 13:49:30 +0100 |
| commit | 706c0a948f0be941c0cc22d0228491d98d1b913f (patch) | |
| tree | 4f05736d7223fb997301a3f154005fdc16952bc5 /cli/app/utils/cortex_utils.py | |
| parent | 0b0b46eb096cce9eafe5e2d6f9bdb7902ff68874 (diff) | |
mimetype tup
Diffstat (limited to 'cli/app/utils/cortex_utils.py')
| -rw-r--r-- | cli/app/utils/cortex_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/app/utils/cortex_utils.py b/cli/app/utils/cortex_utils.py index 4aa4533..fa84cf8 100644 --- a/cli/app/utils/cortex_utils.py +++ b/cli/app/utils/cortex_utils.py @@ -98,6 +98,7 @@ def upload_bytes_to_cortex(opt_folder_id, fn, fp, mimetype, **kwargs): def upload_file_to_cortex(opt_folder_id, fn, **kwargs): """Upload a file from disk""" base_fn = os.path.basename(fn) - mimetype = mimetypes.guess_type(base_fn) + mimetype_tup = mimetypes.guess_type(base_fn) + mimetype = "{}/{}".format(mimetype_tup) with open(fn, 'rb') as fp: return upload_fp_to_cortex(opt_folder_id, (base_fn, fp, mimetype,), **kwargs) |
