diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 349ef11595..569d1bd1c5 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -76,6 +76,7 @@ var ( AttachmentAllowedTypes string AttachmentMaxSize int64 AttachmentMaxFiles int + AttachmentEnabled bool // Cache settings. Cache cache.Cache @@ -176,6 +177,7 @@ func NewConfigContext() { AttachmentAllowedTypes = Cfg.MustValue("attachment", "ALLOWED_TYPES", "*/*") AttachmentMaxSize = Cfg.MustInt64("attachment", "MAX_SIZE", 32) AttachmentMaxFiles = Cfg.MustInt("attachment", "MAX_FILES", 10) + AttachmentEnabled = Cfg.MustBool("attachment", "ENABLE", true) if err = os.MkdirAll(AttachmentPath, os.ModePerm); err != nil { log.Fatal("Could not create directory %s: %s", AttachmentPath, err) |