Skip to content

Commit

Permalink
fix: not path style
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Nov 12, 2024
1 parent ac35ac6 commit 9f3e8dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ type Config struct {
Bucket string
Region string
RegionEndpoint string
ForcePathStyle bool
RootDirectory string
Workers int
CredentialsEndpoint string
Expand Down Expand Up @@ -85,10 +86,13 @@ func NewS3Datastore(conf Config) (*S3Bucket, error) {
})

if conf.RegionEndpoint != "" {
awsConfig.WithS3ForcePathStyle(true)
awsConfig.WithEndpoint(conf.RegionEndpoint)
}

if conf.ForcePathStyle {
awsConfig.WithS3ForcePathStyle(true)
}

awsConfig.WithCredentials(creds)
awsConfig.CredentialsChainVerboseErrors = aws.Bool(true)
awsConfig.WithRegion(conf.Region)
Expand Down

0 comments on commit 9f3e8dc

Please sign in to comment.