diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-04 15:45:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 15:45:19 -0400 |
commit | 49481caf6db89b0853626ac52ab5f786a6887179 (patch) | |
tree | 128991892f16d7830097c217db689410a002eb73 /model/config.go | |
parent | 44a8f76d993cdd97785cab7fd55ad9f07c3c757a (diff) | |
download | chat-49481caf6db89b0853626ac52ab5f786a6887179.tar.gz chat-49481caf6db89b0853626ac52ab5f786a6887179.tar.bz2 chat-49481caf6db89b0853626ac52ab5f786a6887179.zip |
PLT-6262 Add config setting to disable file attachments (#6301)
* Add config setting to disable file attachments
* Add unit tests
* Updating UI for no attachments (#6312)
* Update UI text on file upload System Console setting (#6313)
* Update storage_settings.jsx
* Update en.json
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 9d651035b..3015b3324 100644 --- a/model/config.go +++ b/model/config.go @@ -214,6 +214,7 @@ type PasswordSettings struct { } type FileSettings struct { + EnableFileAttachments *bool MaxFileSize *int64 DriverName string Directory string @@ -474,6 +475,11 @@ func (o *Config) SetDefaults() { *o.FileSettings.AmazonS3SSL = true // Secure by default. } + if o.FileSettings.EnableFileAttachments == nil { + o.FileSettings.EnableFileAttachments = new(bool) + *o.FileSettings.EnableFileAttachments = true + } + if o.FileSettings.MaxFileSize == nil { o.FileSettings.MaxFileSize = new(int64) *o.FileSettings.MaxFileSize = 52428800 // 50 MB |