From bdaee860c07fd0470542ffd56aa6be022089c09c Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sun, 31 Jul 2022 23:36:09 +0800 Subject: [PATCH] just fixed S3Service off OSS initialize config error --- internal/dao/storage/storage.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/dao/storage/storage.go b/internal/dao/storage/storage.go index 63506bab..83ad6b0d 100644 --- a/internal/dao/storage/storage.go +++ b/internal/dao/storage/storage.go @@ -238,7 +238,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) { if conf.CfgIf("OSS:TempDir") { cs = &minioCreateTempDirServant{ client: client, - bucket: conf.MinIOSetting.Bucket, + bucket: conf.S3Setting.Bucket, domain: domain, tempDir: conf.ObjectStorage.TempDirSlash(), } @@ -246,7 +246,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) { } else if conf.CfgIf("OSS:Retention") { cs = &minioCreateRetentionServant{ client: client, - bucket: conf.MinIOSetting.Bucket, + bucket: conf.S3Setting.Bucket, domain: domain, retainInDays: time.Duration(conf.ObjectStorage.RetainInDays) * time.Hour * 24, retainUntilDate: time.Date(2049, time.December, 1, 12, 0, 0, 0, time.UTC), @@ -255,7 +255,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) { } else { cs = &minioCreateServant{ client: client, - bucket: conf.MinIOSetting.Bucket, + bucket: conf.S3Setting.Bucket, domain: domain, } logrus.Debugln("use OSS:Direct feature") @@ -264,7 +264,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) { obj := &s3Servant{ OssCreateService: cs, client: client, - bucket: conf.MinIOSetting.Bucket, + bucket: conf.S3Setting.Bucket, domain: domain, } return obj, obj