From 9b24b120061058c5b05f2d72f0aa1e49ee0ecb1d Mon Sep 17 00:00:00 2001 From: bennykok Date: Tue, 11 Jun 2024 17:42:52 -0700 Subject: [PATCH] fix: file upload issues with cloudflare --- custom_routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_routes.py b/custom_routes.py index a30ee55..4b678dd 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -357,7 +357,7 @@ async def upload_file_endpoint(request): with open(file_path, 'rb') as f: headers = { "Content-Type": file_type, - "x-amz-acl": "public-read", + # "x-amz-acl": "public-read", "Content-Length": str(file_size) } async with session.put(upload_url, data=f, headers=headers) as upload_response: @@ -839,7 +839,7 @@ async def upload_file(prompt_id, filename, subfolder=None, content_type="image/p with open(file, 'rb') as f: data = f.read() headers = { - "x-amz-acl": "public-read", + # "x-amz-acl": "public-read", "Content-Type": content_type, "Content-Length": str(len(data)), }