Merge pull request #181 from alimy/jc/alimy

just fixed S3Service off OSS initialize config error
pull/182/head
Michael Li 3 years ago committed by GitHub
commit 94aa90295d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -238,7 +238,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) {
if conf.CfgIf("OSS:TempDir") { if conf.CfgIf("OSS:TempDir") {
cs = &minioCreateTempDirServant{ cs = &minioCreateTempDirServant{
client: client, client: client,
bucket: conf.MinIOSetting.Bucket, bucket: conf.S3Setting.Bucket,
domain: domain, domain: domain,
tempDir: conf.ObjectStorage.TempDirSlash(), tempDir: conf.ObjectStorage.TempDirSlash(),
} }
@ -246,7 +246,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) {
} else if conf.CfgIf("OSS:Retention") { } else if conf.CfgIf("OSS:Retention") {
cs = &minioCreateRetentionServant{ cs = &minioCreateRetentionServant{
client: client, client: client,
bucket: conf.MinIOSetting.Bucket, bucket: conf.S3Setting.Bucket,
domain: domain, domain: domain,
retainInDays: time.Duration(conf.ObjectStorage.RetainInDays) * time.Hour * 24, retainInDays: time.Duration(conf.ObjectStorage.RetainInDays) * time.Hour * 24,
retainUntilDate: time.Date(2049, time.December, 1, 12, 0, 0, 0, time.UTC), retainUntilDate: time.Date(2049, time.December, 1, 12, 0, 0, 0, time.UTC),
@ -255,7 +255,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) {
} else { } else {
cs = &minioCreateServant{ cs = &minioCreateServant{
client: client, client: client,
bucket: conf.MinIOSetting.Bucket, bucket: conf.S3Setting.Bucket,
domain: domain, domain: domain,
} }
logrus.Debugln("use OSS:Direct feature") logrus.Debugln("use OSS:Direct feature")
@ -264,7 +264,7 @@ func MustS3Service() (core.ObjectStorageService, core.VersionInfo) {
obj := &s3Servant{ obj := &s3Servant{
OssCreateService: cs, OssCreateService: cs,
client: client, client: client,
bucket: conf.MinIOSetting.Bucket, bucket: conf.S3Setting.Bucket,
domain: domain, domain: domain,
} }
return obj, obj return obj, obj

Loading…
Cancel
Save