mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 06:19:03 +08:00
fix(storage): 🐛 HeadBucket Operation Permission (#7733)
Co-authored-by: 莫岳恒 <moyueheng@datagrand.com>
This commit is contained in:
parent
7cfebffbb8
commit
4682e0ac7c
@ -35,6 +35,9 @@ class S3Storage(BaseStorage):
|
|||||||
# if bucket not exists, create it
|
# if bucket not exists, create it
|
||||||
if e.response["Error"]["Code"] == "404":
|
if e.response["Error"]["Code"] == "404":
|
||||||
self.client.create_bucket(Bucket=self.bucket_name)
|
self.client.create_bucket(Bucket=self.bucket_name)
|
||||||
|
# if bucket is not accessible, pass, maybe the bucket is existing but not accessible
|
||||||
|
elif e.response["Error"]["Code"] == "403":
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
# other error, raise exception
|
# other error, raise exception
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user