aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorPhilip Couling <couling@gmail.com>2017-01-15 14:57:00 +0000
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-15 22:57:00 +0800
commit64375d875b4d46a6081026290da8efd82c84b25f (patch)
treede35ef6470c9f8762f2dcd1912fc56dc4a499bad /modules/setting
parentdce03c19cb6c0f067a75f04a1bc1e7cb3528c585 (diff)
downloadgitea-64375d875b4d46a6081026290da8efd82c84b25f.tar.gz
gitea-64375d875b4d46a6081026290da8efd82c84b25f.zip
Attach to release (#673)
* Moved attachaments POST url from /issues/attachments to /attachments * Implemented attachment upload on release page * Implemented downloading attachments on the release page * Added zip and gzip files to default allowed attachments * Implemented uploading attachments on edit release * Renamed UploadIssueAttachment to UploadAttachment
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 523582f703..ab916c1b53 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -718,7 +718,7 @@ please consider changing to GITEA_CUSTOM`)
if !filepath.IsAbs(AttachmentPath) {
AttachmentPath = path.Join(workDir, AttachmentPath)
}
- AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png"), "|", ",", -1)
+ 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)