From d5213db55d33d61c5ac7e590d8735e53862ec218 Mon Sep 17 00:00:00 2001 From: John Hollowell Date: Sat, 2 Oct 2021 19:43:49 +0000 Subject: [PATCH] Add patch for requests_tollbelt filename issue Until https://github.com/requests/toolbelt/pull/316 is merged, this will allow requests_toolbelt to send all the data needed by Proxmox --- proxmoxer/backends/https.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxmoxer/backends/https.py b/proxmoxer/backends/https.py index de8aba3..5ffcce2 100644 --- a/proxmoxer/backends/https.py +++ b/proxmoxer/backends/https.py @@ -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]