From 3c0f082506a68240abd1960cbd0fda22679e12c2 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 28 Jul 2017 13:52:31 -0400 Subject: PLT-6924 Added config options to disable file uploads/downloads on mobile (#7049) --- model/config.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'model') diff --git a/model/config.go b/model/config.go index 9daee78c8..a1af59185 100644 --- a/model/config.go +++ b/model/config.go @@ -236,6 +236,8 @@ type PasswordSettings struct { type FileSettings struct { EnableFileAttachments *bool + EnableMobileUpload *bool + EnableMobileDownload *bool MaxFileSize *int64 DriverName string Directory string @@ -539,6 +541,16 @@ func (o *Config) SetDefaults() { *o.FileSettings.EnableFileAttachments = true } + if o.FileSettings.EnableMobileUpload == nil { + o.FileSettings.EnableMobileUpload = new(bool) + *o.FileSettings.EnableMobileUpload = true + } + + if o.FileSettings.EnableMobileDownload == nil { + o.FileSettings.EnableMobileDownload = new(bool) + *o.FileSettings.EnableMobileDownload = true + } + if o.FileSettings.MaxFileSize == nil { o.FileSettings.MaxFileSize = new(int64) *o.FileSettings.MaxFileSize = 52428800 // 50 MB -- cgit v1.2.3-1-g7c22