Skip to content

Commit

Permalink
fix: s3 image uploads to us-east-1 (us standard) did not return corre…
Browse files Browse the repository at this point in the history
…ct image urls so images shared to slack and other services was not correct, fixes #8444
  • Loading branch information
torkelo committed May 23, 2017
1 parent 423ad4d commit befc15c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"company": "Coding Instinct AB"
},
"name": "grafana",
"version": "4.3.0",
"version": "4.3.1",
"repository": {
"type": "git",
"url": "http://github.com/grafana/grafana.git"
Expand Down
6 changes: 5 additions & 1 deletion pkg/components/imguploader/s3uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,9 @@ func (u *S3Uploader) Upload(imageDiskPath string) (string, error) {
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
}
}

0 comments on commit befc15c

Please sign in to comment.