fix: file upload issues with cloudflare
This commit is contained in:
parent
ff70bbdcec
commit
9b24b12006
@ -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)),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user