diff options
author | capvor <capvor@sina.com> | 2023-12-06 23:59:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 10:59:56 -0500 |
commit | c1b86ecdab20d741e3d494680196ddd4c8402f76 (patch) | |
tree | 45d881e2d2018ca73ffb8ed7203156f6e0a4a3a7 /modules/setting/attachment.go | |
parent | ec90ee61ef60eb02a3145c06b11d97cdea7c4af8 (diff) | |
download | gitea-c1b86ecdab20d741e3d494680196ddd4c8402f76.tar.gz gitea-c1b86ecdab20d741e3d494680196ddd4c8402f76.zip |
Fix incorrect default value of `[attachment].MAX_SIZE` (#28373)
Diffstat (limited to 'modules/setting/attachment.go')
-rw-r--r-- | modules/setting/attachment.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/attachment.go b/modules/setting/attachment.go index 007aae9d04..934d4d7f46 100644 --- a/modules/setting/attachment.go +++ b/modules/setting/attachment.go @@ -26,7 +26,7 @@ func loadAttachmentFrom(rootCfg ConfigProvider) (err error) { } Attachment.AllowedTypes = sec.Key("ALLOWED_TYPES").MustString(".csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip") - Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(4) + Attachment.MaxSize = sec.Key("MAX_SIZE").MustInt64(2048) Attachment.MaxFiles = sec.Key("MAX_FILES").MustInt(5) Attachment.Enabled = sec.Key("ENABLED").MustBool(true) |