mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
fix: allow to do role auth for S3 bucket use. (#8149)
### What problem does this PR solve? Close #8148 . ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -65,6 +65,10 @@ class RAGFlowS3:
|
||||
pass
|
||||
|
||||
try:
|
||||
s3_params = {}
|
||||
# if not set ak/sk, boto3 s3 client would try several ways to do the authentication
|
||||
# see doc: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials
|
||||
if self.access_key and self.secret_key:
|
||||
s3_params = {
|
||||
'aws_access_key_id': self.access_key,
|
||||
'aws_secret_access_key': self.secret_key,
|
||||
|
||||
Reference in New Issue
Block a user