summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/file.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/utils/file.go b/utils/file.go
index 0ba132b09..19fa335c4 100644
--- a/utils/file.go
+++ b/utils/file.go
@@ -33,7 +33,17 @@ func s3New(endpoint, accessKey, secretKey string, secure bool, signV2 bool, regi
} else {
creds = credentials.NewStatic(accessKey, secretKey, "", credentials.SignatureV4)
}
- return s3.NewWithCredentials(endpoint, creds, secure, region)
+
+ s3Clnt, err := s3.NewWithCredentials(endpoint, creds, secure, region)
+ if err != nil {
+ return nil, err
+ }
+
+ if *Cfg.FileSettings.AmazonS3Trace {
+ s3Clnt.TraceOn(os.Stdout)
+ }
+
+ return s3Clnt, nil
}
func TestFileConnection() *model.AppError {