fix: boto3 1.35+ Garage S3 checksum regression
Add request_checksum_calculation=when_required to boto3 Config to prevent STREAMING-* sha256 header that Garage S3 rejects. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,11 @@ def _s3_upload_png(png: bytes, job_id: str) -> str | None:
|
||||
aws_access_key_id=_S3_ACCESS,
|
||||
aws_secret_access_key=_S3_SECRET,
|
||||
region_name="garage",
|
||||
config=Config(signature_version="s3v4"),
|
||||
config=Config(
|
||||
signature_version="s3v4",
|
||||
request_checksum_calculation="when_required",
|
||||
response_checksum_validation="when_required",
|
||||
),
|
||||
).put_object(Bucket=_S3_BUCKET, Key=key, Body=png, ContentType="image/png")
|
||||
return f"{_S3_PUBLIC_BASE}/{key}"
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user