diff --git a/backend/utils/cloud_storage/client/s3.go b/backend/utils/cloud_storage/client/s3.go index 9fc7ebadd..bcdb00b47 100644 --- a/backend/utils/cloud_storage/client/s3.go +++ b/backend/utils/cloud_storage/client/s3.go @@ -27,12 +27,16 @@ func NewS3Client(vars map[string]interface{}) (*s3Client, error) { if len(scType) == 0 { scType = "Standard" } + mode := loadParamFromVars("mode", vars) + if len(mode) == 0 { + mode = "virtual hosted" + } sess, err := session.NewSession(&aws.Config{ Credentials: credentials.NewStaticCredentials(accessKey, secretKey, ""), Endpoint: aws.String(endpoint), Region: aws.String(region), DisableSSL: aws.Bool(true), - S3ForcePathStyle: aws.Bool(false), + S3ForcePathStyle: aws.Bool(mode == "path"), }) if err != nil { return nil, err diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 15d940f52..3215cd9f7 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1410,6 +1410,7 @@ const message = { LOCAL: 'Server Disks', OSS: 'Ali OSS', S3: 'Amazon S3', + mode: 'Mode', MINIO: 'MINIO', SFTP: 'SFTP', WebDAV: 'WebDAV', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 4ba5e2113..588f17ffb 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1323,6 +1323,7 @@ const message = { LOCAL: '服務器磁盤', OSS: '阿裏雲 OSS', S3: '亞馬遜 S3 雲存儲', + mode: '模式', MINIO: 'MINIO', SFTP: 'SFTP', WebDAV: 'WebDAV', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index d0c54518d..fa32d2805 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1327,6 +1327,7 @@ const message = { LOCAL: '服务器磁盘', OSS: '阿里云 OSS', S3: '亚马逊 S3 云存储', + mode: '模式', MINIO: 'MINIO', SFTP: 'SFTP', WebDAV: 'WebDAV', diff --git a/frontend/src/views/setting/backup-account/cos/index.vue b/frontend/src/views/setting/backup-account/cos/index.vue index e5c4ce2ba..cefec5356 100644 --- a/frontend/src/views/setting/backup-account/cos/index.vue +++ b/frontend/src/views/setting/backup-account/cos/index.vue @@ -47,7 +47,7 @@