We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8abb527 commit 21a33f0Copy full SHA for 21a33f0
1 file changed
pushd_plugin.go
@@ -18,6 +18,7 @@ import (
18
"github.com/aws/aws-sdk-go/aws/session"
19
"github.com/aws/aws-sdk-go/service/s3"
20
"github.com/google/uuid"
21
+ "github.com/imgproxy/imgproxy/v3/config"
22
)
23
24
var pushdPath = "/pushd"
@@ -116,7 +117,11 @@ func createMD5Hash(data []byte) string {
116
117
func uploadToS3(data []byte, s3Key string, uploaded chan bool) {
118
md5Hash := createMD5Hash(data)
119
log.Infof("Uploading rendered image to: %s with md5 hash: %s", s3Key, md5Hash)
- awsSession, err := session.NewSession()
120
+ awsSession, err := session.NewSession(&aws.Config{
121
+ Endpoint: aws.String(config.S3Endpoint),
122
+ Region: aws.String(config.S3Region),
123
+ S3ForcePathStyle: aws.Bool(true),
124
+ })
125
if err != nil {
126
log.Error(err.Error())
127
return
0 commit comments