Fix S3-compliant storage providers support

This commit is contained in:
Yang Luo 2023-12-20 14:38:32 +08:00
parent a42594859f
commit f8905ae64c

View File

@ -22,12 +22,13 @@ import (
func NewAwsS3StorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface { func NewAwsS3StorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface {
sp := s3.New(&s3.Config{ sp := s3.New(&s3.Config{
AccessID: clientId, AccessID: clientId,
AccessKey: clientSecret, AccessKey: clientSecret,
Region: region, Region: region,
Bucket: bucket, Bucket: bucket,
Endpoint: endpoint, Endpoint: endpoint,
ACL: awss3.BucketCannedACLPublicRead, S3Endpoint: endpoint,
ACL: awss3.BucketCannedACLPublicRead,
}) })
return sp return sp