mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: s3 image uploads to us-east-1 (us standard) did not return correct image urls so images shared to slack and other services was not correct, fixes #8444
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
"company": "Coding Instinct AB"
|
"company": "Coding Instinct AB"
|
||||||
},
|
},
|
||||||
"name": "grafana",
|
"name": "grafana",
|
||||||
"version": "4.3.0",
|
"version": "4.3.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "http://github.com/grafana/grafana.git"
|
"url": "http://github.com/grafana/grafana.git"
|
||||||
|
|||||||
@@ -78,5 +78,9 @@ func (u *S3Uploader) Upload(imageDiskPath string) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
return "https://" + u.bucket + ".s3-" + u.region + ".amazonaws.com/" + key, nil
|
if u.region == "us-east-1" {
|
||||||
|
return "https://" + u.bucket + ".s3.amazonaws.com/" + key, nil
|
||||||
|
} else {
|
||||||
|
return "https://" + u.bucket + ".s3-" + u.region + ".amazonaws.com/" + key, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user