Skip to content
Permalink
Browse files
Pass name of file in remote API call when saving file
  • Loading branch information
machristie committed Jul 29, 2021
1 parent 4ce71c9 commit 5087097fc683b4453cf9a7e8189a7179f9f7ba5d
Showing 1 changed file with 2 additions and 2 deletions.
@@ -80,7 +80,7 @@ def save(request, path, file, name=None, content_type=None, storage_resource_id=
if name is None and hasattr(file, 'name'):
name = os.path.basename(file.name)
files = {'file': (name, file, content_type)
if content_type is not None else file, }
if content_type is not None else (name, file)}
resp = _call_remote_api(request,
"/user-storage/~/{path}",
path_params={"path": path},
@@ -107,7 +107,7 @@ def save_input_file(request, file, name=None, content_type=None, storage_resourc
if name is None and hasattr(file, 'name'):
name = os.path.basename(file.name)
files = {'file': (name, file, content_type)
if content_type is not None else file, }
if content_type is not None else (name, file)}
resp = _call_remote_api(request,
"/upload",
method="post",

0 comments on commit 5087097

Please sign in to comment.