From 7673ca96463395ccc05974ee6293021479c3e054 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 29 May 2018 08:27:44 +0800 Subject: [PATCH] fix attachment ENABLED (#4064) (#4066) * fix attachment ENABLED * change wrong name on app.ini.sample --- custom/conf/app.ini.sample | 2 +- 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 57fa5ec3d..7dddd5525 100644 --- a/custom/conf/app.ini.sample +++ b/custom/conf/app.ini.sample @@ -403,7 +403,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 338637836..abe61acca 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -956,7 +956,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{