From 2b1c9145f4b2484a9d9245394b61063d03906f63 Mon Sep 17 00:00:00 2001 From: DhruvSrikanth Date: Thu, 8 Aug 2024 16:17:40 +0100 Subject: [PATCH] Rectifyimage uploading procedure --- weco/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/weco/client.py b/weco/client.py index 4a2f1d4..a40ede1 100644 --- a/weco/client.py +++ b/weco/client.py @@ -276,8 +276,7 @@ def _upload_image(self, fn_name: str, upload_id: str, image_info: Dict[str, Any] response = self._make_request(endpoint=endpoint, data=request_data, is_async=False) # Upload the image to the S3 bucket - image_name = generate_random_base16_code() - files = {"file": (f"{image_name}.{file_type}", upload_data)} + files = {"file": upload_data} http_response = requests.post(response["url"], data=response["fields"], files=files) if http_response.status_code == 204: pass