diff options
author | Unknwon <u@gogs.io> | 2015-08-11 23:24:40 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-11 23:24:40 +0800 |
commit | 34f6cbfc2a13295d2c8ab33f17ddbca27337b18b (patch) | |
tree | 1264ba8fa4370d05c0f5efcd81d7e28380110454 /modules/setting | |
parent | 89c2bd4a0dd85261f72565ba8395644da8129fea (diff) | |
download | gitea-34f6cbfc2a13295d2c8ab33f17ddbca27337b18b.tar.gz gitea-34f6cbfc2a13295d2c8ab33f17ddbca27337b18b.zip |
finish attachments when create issue
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index d32df47368..acd3aae689 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -285,9 +285,9 @@ func NewConfigContext() { if !filepath.IsAbs(AttachmentPath) { AttachmentPath = path.Join(workDir, AttachmentPath) } - AttachmentAllowedTypes = sec.Key("ALLOWED_TYPES").MustString("image/jpeg|image/png") + AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png"), "|", ",", -1) AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(32) - AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(10) + AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(5) AttachmentEnabled = sec.Key("ENABLE").MustBool(true) TimeFormat = map[string]string{ |