From f63b1166970705454f62059cf46f3fbc6f0c8871 Mon Sep 17 00:00:00 2001 From: Nanguan Lin <70063547+lng2020@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:42:00 +0800 Subject: [PATCH] Change default size of attachments and repo files (#28100) https://github.com/go-gitea/gitea/pull/27946 forgets to change them in code. Sorry about that. --- modules/setting/attachment.go | 2 +- modules/setting/repository.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/setting/attachment.go b/modules/setting/attachment.go index 491564c9dcc0..007aae9d0440 100644 --- a/modules/setting/attachment.go +++ b/modules/setting/attachment.go @@ -13,7 +13,7 @@ var Attachment = struct { }{ Storage: &Storage{}, AllowedTypes: ".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", - MaxSize: 4, + MaxSize: 2048, MaxFiles: 5, Enabled: true, } diff --git a/modules/setting/repository.go b/modules/setting/repository.go index 42ffb99138a1..9697a851d3ba 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -184,7 +184,7 @@ var ( Enabled: true, TempPath: "data/tmp/uploads", AllowedTypes: "", - FileMaxSize: 3, + FileMaxSize: 50, MaxFiles: 5, },