fix (s3): cloudflare s3 default

This commit is contained in:
Mickael Kerjean 2023-01-26 01:18:05 +11:00
parent 9c52561e99
commit 3727981e75

View file

@ -41,6 +41,9 @@ func (s S3Backend) Init(params map[string]string, app *App) (IBackend, error) {
if params["region"] == "" {
params["region"] = "us-east-2"
if strings.HasSuffix(params["endpoint"], ".cloudflarestorage.com") {
params["region"] = "auto"
}
}
creds := []credentials.Provider{}
if params["access_key_id"] != "" || params["secret_access_key"] != "" {