diff options
Diffstat (limited to 'modules/setting/attachment.go')
-rw-r--r-- | modules/setting/attachment.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/setting/attachment.go b/modules/setting/attachment.go index 56ccf5bc57..a51b23913a 100644 --- a/modules/setting/attachment.go +++ b/modules/setting/attachment.go @@ -6,7 +6,6 @@ package setting import ( "path/filepath" - "strings" "code.gitea.io/gitea/modules/log" ) @@ -65,7 +64,7 @@ func newAttachmentService() { Attachment.Minio.BasePath = sec.Key("MINIO_BASE_PATH").MustString("attachments/") } - Attachment.AllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png,application/zip,application/gzip"), "|", ",", -1) + Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".docx,.gif,.gz,.jpeg,.jpg,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip") Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4) Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5) Attachment.Enabled = sec.Key("ENABLED").MustBool(true) |