Set fields in AIOConfig to prevent MissingContentLength error on upload (#2665)
Needed to support upload with certain S3 providers. Fixes #2664
This commit is contained in:
parent
d4a2a66d6d
commit
67bf949802
@ -314,11 +314,15 @@ class StorageOps:
|
|||||||
|
|
||||||
session = aiobotocore.session.get_session()
|
session = aiobotocore.session.get_session()
|
||||||
|
|
||||||
config = None
|
config = AioConfig(
|
||||||
|
request_checksum_calculation="WHEN_REQUIRED",
|
||||||
|
response_checksum_validation="WHEN_REQUIRED",
|
||||||
|
)
|
||||||
|
|
||||||
if for_presign and storage.access_endpoint_url != storage.endpoint_url:
|
if for_presign and storage.access_endpoint_url != storage.endpoint_url:
|
||||||
s3 = {"addressing_style": storage.access_addressing_style}
|
s3 = {"addressing_style": storage.access_addressing_style}
|
||||||
config = AioConfig(signature_version="s3v4", s3=s3)
|
config.signature_version = "s3v4"
|
||||||
|
config.s3 = s3
|
||||||
|
|
||||||
async with session.create_client(
|
async with session.create_client(
|
||||||
"s3",
|
"s3",
|
||||||
|
@ -10,7 +10,7 @@ loguru
|
|||||||
aiofiles
|
aiofiles
|
||||||
kubernetes-asyncio==29.0.0
|
kubernetes-asyncio==29.0.0
|
||||||
kubernetes
|
kubernetes
|
||||||
aiobotocore
|
aiobotocore>=2.22.0
|
||||||
requests
|
requests
|
||||||
redis>=5.0.0
|
redis>=5.0.0
|
||||||
pyyaml
|
pyyaml
|
||||||
|
Loading…
Reference in New Issue
Block a user