Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #2 from pranav/us-east-1
Browse files Browse the repository at this point in the history
Add support for us-east-1
  • Loading branch information
luizbafilho authored Jun 7, 2017
2 parents 39924be + e7a520f commit 24ff9ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storage/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,10 @@ func (s *S3Store) Put(bucket string, path string, content []byte) (*storage.PutR

// GetURL ...
func (s *S3Store) GetURL(bucket string, path string) string {
return fmt.Sprintf("https://s3-%s.amazonaws.com/%s/%s", s.config.Region, bucket, path)
domain := fmt.Sprintf("s3-%s.amazonaws.com", s.config.Region)
if s.config.Region == "us-east-1" {
domain = "s3.amazonaws.com"
}

return fmt.Sprintf("https://%s/%s/%s", domain, bucket, path)
}

0 comments on commit 24ff9ea

Please sign in to comment.