Use NewWithRegion not minio's region resolution

This commit is contained in:
Carl Lange 2019-06-30 16:32:59 +01:00 committed by GitHub
parent fb6584d7e4
commit 95962c2412
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
}