|
@@ -47,7 +47,9 @@ func NewS3Storage(useAws bool, endpoint string, usePathStyle bool, ak string, sk
|
|
|
}
|
|
|
|
|
|
client = s3.NewFromConfig(cfg, func(options *s3.Options) {
|
|
|
- options.BaseEndpoint = aws.String(endpoint)
|
|
|
+ if endpoint != "" {
|
|
|
+ options.BaseEndpoint = aws.String(endpoint)
|
|
|
+ }
|
|
|
})
|
|
|
} else {
|
|
|
client = s3.New(s3.Options{
|
|
@@ -179,4 +181,4 @@ func (s *S3Storage) State(key string) (oss.OSSState, error) {
|
|
|
|
|
|
func (s *S3Storage) Type() string {
|
|
|
return oss.OSS_TYPE_S3
|
|
|
-}
|
|
|
+}
|