From 8966e575be55344d6353e93528218a00aa55780a Mon Sep 17 00:00:00 2001 From: Kazuki Suzuki Przyborowski Date: Sun, 17 Mar 2024 00:20:26 -0700 Subject: [PATCH] Add files via upload --- pycatfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pycatfile.py b/pycatfile.py index 91867c7..6972ba1 100755 --- a/pycatfile.py +++ b/pycatfile.py @@ -6435,10 +6435,8 @@ def download_file_from_http_file(url, headers=geturls_headers_pycatfile_python_a if parsed_url.port: netloc += ':' + str(parsed_url.port); rebuilt_url = urlunparse((parsed_url.scheme, netloc, parsed_url.path, parsed_url.params, parsed_url.query, parsed_url.fragment)); - # Create a temporary file object - temp_file = tempfile.TemporaryFile(); - + temp_file = BytesIO(); if haverequests: # Use the requests library if available if username and password: