diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-28 22:56:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-28 22:56:54 +0800 |
commit | 5c95f7c7ce0dd992932f1bd3c3a40240aa11d4d0 (patch) | |
tree | eac2427025b6fe63da1cf29fd51cd782dda0b933 | |
parent | fd274ffcd9bfdaac210278794ca4d87216868b8a (diff) | |
download | gitea-5c95f7c7ce0dd992932f1bd3c3a40240aa11d4d0.tar.gz gitea-5c95f7c7ce0dd992932f1bd3c3a40240aa11d4d0.zip |
fix attachment ENABLED (#4064)
* fix attachment ENABLED
* change wrong name on app.ini.sample
-rw-r--r-- | custom/conf/app.ini.sample | 2 | ||||
-rw-r--r-- | modules/setting/setting.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/custom/conf/app.ini.sample b/custom/conf/app.ini.sample index 8392576da2..184fa8e8cc 100644 --- a/custom/conf/app.ini.sample +++ b/custom/conf/app.ini.sample @@ -412,7 +412,7 @@ ENABLE_FEDERATED_AVATAR = false [attachment] ; Whether attachments are enabled. Defaults to `true` -ENABLE = true +ENABLED = true ; Path for attachments. Defaults to `data/attachments` PATH = data/attachments ; One or more allowed types, e.g. image/jpeg|image/png diff --git a/modules/setting/setting.go b/modules/setting/setting.go index adf4bb74fd..b23a68e3ac 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -947,7 +947,7 @@ func NewContext() { AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png,application/zip,application/gzip"), "|", ",", -1) AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(4) AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(5) - AttachmentEnabled = sec.Key("ENABLE").MustBool(true) + AttachmentEnabled = sec.Key("ENABLED").MustBool(true) TimeFormatKey := Cfg.Section("time").Key("FORMAT").MustString("RFC1123") TimeFormat = map[string]string{ |