Merge pull request #22 from CarlQLange/new-with-region

Use NewWithRegion not minio's region resolution
This commit is contained in:
Cyrill Troxler 2019-07-26 02:56:09 +02:00 committed by GitHub
commit 6a23dbae72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ func newS3Client(cfg *Config) (*s3Client, error) {
if u.Port() != "" {
endpoint = u.Hostname() + ":" + u.Port()
}
minioClient, err := minio.New(endpoint, client.cfg.AccessKeyID, client.cfg.SecretAccessKey, ssl)
minioClient, err := minio.NewWithRegion(endpoint, client.cfg.AccessKeyID, client.cfg.SecretAccessKey, ssl, client.cfg.Region)
if err != nil {
return nil, err
}