summaryrefslogtreecommitdiffstats
path: root/utils/file_backend_s3.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-03-19 10:53:37 +0000
committerGeorge Goldberg <george@gberg.me>2018-03-19 10:53:37 +0000
commit37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493 (patch)
tree4b791b279109a10a66b62aaeeeae3d5243d2961b /utils/file_backend_s3.go
parentfadcdd271a68b38571b75d1d38ab023f940ac83a (diff)
parent4b675b347b5241def7807fab5e01ce9b98531815 (diff)
downloadchat-37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493.tar.gz
chat-37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493.tar.bz2
chat-37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493.zip
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'utils/file_backend_s3.go')
-rw-r--r--utils/file_backend_s3.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/utils/file_backend_s3.go b/utils/file_backend_s3.go
index b0601bc8a..75282897f 100644
--- a/utils/file_backend_s3.go
+++ b/utils/file_backend_s3.go
@@ -253,12 +253,9 @@ func CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError {
return model.NewAppError("S3File", "api.admin.test_s3.missing_s3_bucket", nil, "", http.StatusBadRequest)
}
+ // if S3 endpoint is not set call the set defaults to set that
if len(settings.AmazonS3Endpoint) == 0 {
- return model.NewAppError("S3File", "api.admin.test_s3.missing_s3_endpoint", nil, "", http.StatusBadRequest)
- }
-
- if len(settings.AmazonS3Region) == 0 {
- return model.NewAppError("S3File", "api.admin.test_s3.missing_s3_region", nil, "", http.StatusBadRequest)
+ settings.SetDefaults()
}
return nil