Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(api): boto client is not compatiable (#34385)

wangxiaolei04338cc95dda
diff --git a/api/extensions/storage/aws_s3_storage.py b/api/extensions/storage/aws_s3_storage.py
index e90ebe69bee..5c17178fa79 100644
--- a/api/extensions/storage/aws_s3_storage.py
+++ b/api/extensions/storage/aws_s3_storage.py
@@ -27,13 +27,19 @@ class AwsS3Storage(BaseStorage):
else:
logger.info("Using ak and sk for S3")
+ config = Config(
+ s3={"addressing_style": dify_config.S3_ADDRESS_STYLE},
+ request_checksum_calculation="when_required",
+ response_checksum_validation="when_required",
+ )
+
self.client = boto3.client(
"s3",
aws_secret_access_key=dify_config.S3_SECRET_KEY,
aws_access_key_id=dify_config.S3_ACCESS_KEY,
endpoint_url=dify_config.S3_ENDPOINT,
region_name=dify_config.S3_REGION,
- config=Config(s3={"addressing_style": dify_config.S3_ADDRESS_STYLE}),
+ config=config,
)
# create bucket
try: