diff options
author | Justin Nuß <justin.nuss@hmmh.de> | 2014-07-24 15:51:40 +0200 |
---|---|---|
committer | Justin Nuß <justin.nuss@hmmh.de> | 2014-07-24 15:51:40 +0200 |
commit | 4d702eb345d36888b9cace32ba51ac79e9a260f8 (patch) | |
tree | 76dac7e89f25120e9fe6359494c7db325564c9ae /modules/setting | |
parent | 9df99681fbcb5a809d2821c3861c8655f885af7a (diff) | |
download | gitea-4d702eb345d36888b9cace32ba51ac79e9a260f8.tar.gz gitea-4d702eb345d36888b9cace32ba51ac79e9a260f8.zip |
Allow disabling uploads
Diffstat (limited to 'modules/setting')
-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) |