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:
Tessa Walsh 2025-06-12 15:27:38 -04:00 committed by GitHub
parent d4a2a66d6d
commit 67bf949802
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -314,11 +314,15 @@ class StorageOps:
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:
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(
"s3",

View File

@ -10,7 +10,7 @@ loguru
aiofiles
kubernetes-asyncio==29.0.0
kubernetes
aiobotocore
aiobotocore>=2.22.0
requests
redis>=5.0.0
pyyaml