Skip to content

Commit

Permalink
Add patch for requests_tollbelt filename issue
Browse files Browse the repository at this point in the history
Until requests/toolbelt#316 is merged, this will allow requests_toolbelt to send all the data needed by Proxmox
  • Loading branch information
jhollowe committed Oct 2, 2021
1 parent eb74f65 commit d5213db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxmoxer/backends/https.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ def request(self, method, url, params=None, data=None, headers=None, cookies=Non
for k, v in data.copy().items():
if is_file(v):
if getFileSize(v) > 2147483647:
largeFiles[k] = v
# add in filename from file pointer (patch for https://github.com/requests/toolbelt/pull/316)
largeFiles[k] = (requests.utils.guess_filename(v), v)
else:
files[k] = v
del data[k]
Expand Down

0 comments on commit d5213db

Please sign in to comment.