fix: make force-path-style available

This commit is contained in:
Mustafa Gezen 2021-09-10 23:08:16 +02:00
parent 373e96f0c9
commit 1e769f96dd
Signed by: mustafa
GPG Key ID: DCDF010D946438C1

View File

@ -55,6 +55,10 @@ func New(name string) *S3 {
awsCfg.DisableSSL = aws.Bool(true)
}
if forcePathStyle := viper.GetBool("s3-force-path-style"); forcePathStyle {
awsCfg.S3ForcePathStyle = aws.Bool(true)
}
sess := session.Must(session.NewSession(awsCfg))
uploader := s3manager.NewUploader(sess)