Skip to content

Commit

Permalink
fix logic in http_client to split request body between json/data/files
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Sep 22, 2024
1 parent fc411c4 commit 6cd7a6f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/gooey/core/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,8 @@ def gooey_process_request_params(
new_files[k] = [open(item, "rb") for item in v]
elif v and isinstance(v, str) and os.path.exists(v):
new_files[k] = open(v, "rb")
elif isinstance(v, str) or v is omit or not v:
# a URL, None, or omitted value
data[k] = new_files.pop(k)
else:
new_files[k] = v
data[k] = new_files.pop(k)

if new_files:
return GooeyRequestParams(
Expand Down

0 comments on commit 6cd7a6f

Please sign in to comment.