Skip to content

Commit f9ae00f

Browse files
lng2020GiteaBot
authored andcommitted
Change default size of issue/pr attachments and repo file (go-gitea#27946)
As title. Some attachments and file sizes can easily be larger than these limits
1 parent 97f4239 commit f9ae00f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

custom/conf/app.example.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,8 @@ LEVEL = Info
10141014
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
10151015
;ALLOWED_TYPES =
10161016
;;
1017-
;; Max size of each file in megabytes. Defaults to 3MB
1018-
;FILE_MAX_SIZE = 3
1017+
;; Max size of each file in megabytes. Defaults to 50MB
1018+
;FILE_MAX_SIZE = 50
10191019
;;
10201020
;; Max number of files per upload. Defaults to 5
10211021
;MAX_FILES = 5
@@ -1815,8 +1815,8 @@ LEVEL = Info
18151815
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
18161816
;ALLOWED_TYPES = .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
18171817
;;
1818-
;; Max size of each file. Defaults to 4MB
1819-
;MAX_SIZE = 4
1818+
;; Max size of each file. Defaults to 2048MB
1819+
;MAX_SIZE = 2048
18201820
;;
18211821
;; Max number of files per upload. Defaults to 5
18221822
;MAX_FILES = 5

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
146146
- `ENABLED`: **true**: Whether repository file uploads are enabled
147147
- `TEMP_PATH`: **data/tmp/uploads**: Path for uploads (content gets deleted on Gitea restart)
148148
- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
149-
- `FILE_MAX_SIZE`: **3**: Max size of each file in megabytes.
149+
- `FILE_MAX_SIZE`: **50**: Max size of each file in megabytes.
150150
- `MAX_FILES`: **5**: Max number of files per upload
151151

152152
### Repository - Release (`repository.release`)
@@ -822,7 +822,7 @@ Default templates for project boards:
822822

823823
- `ENABLED`: **true**: Whether issue and pull request attachments are enabled.
824824
- `ALLOWED_TYPES`: **.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**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
825-
- `MAX_SIZE`: **4**: Maximum size (MB).
825+
- `MAX_SIZE`: **2048**: Maximum size (MB).
826826
- `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once.
827827
- `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]`
828828
- `SERVE_DIRECT`: **false**: Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing.

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ menu:
145145
- `ENABLED`: **true**: 是否启用仓库文件上传。
146146
- `TEMP_PATH`: **data/tmp/uploads**: 文件上传的临时保存路径(在Gitea重启的时候该目录会被清空)。
147147
- `ALLOWED_TYPES`: **_empty_**: 以逗号分割的列表,代表支持上传的文件类型。(`.zip`), mime类型 (`text/plain`) or 通配符类型 (`image/*`, `audio/*`, `video/*`). 为空或者 `*/*`代表允许所有类型文件。
148-
- `FILE_MAX_SIZE`: **3**: 每个文件的最大大小(MB)。
148+
- `FILE_MAX_SIZE`: **50**: 每个文件的最大大小(MB)。
149149
- `MAX_FILES`: **5**: 每次上传的最大文件数。
150150

151151
### 仓库 - 版本发布 (`repository.release`)
@@ -784,7 +784,7 @@ Gitea 创建以下非唯一队列:
784784

785785
- `ENABLED`: **true**: 是否允许用户上传附件。
786786
- `ALLOWED_TYPES`: **.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**: 允许的文件扩展名(`.zip`)、mime 类型(`text/plain`)或通配符类型(`image/*``audio/*``video/*`)的逗号分隔列表。空值或 `*/*` 允许所有类型。
787-
- `MAX_SIZE`: **4**: 附件的最大限制(MB)。
787+
- `MAX_SIZE`: **2048**: 附件的最大限制(MB)。
788788
- `MAX_FILES`: **5**: 一次最多上传的附件数量。
789789
- `STORAGE_TYPE`: **local**: 附件的存储类型,`local` 表示本地磁盘,`minio` 表示兼容 S3 的对象存储服务,如果未设置将使用默认值 `local` 或其他在 `[storage.xxx]` 中定义的名称。
790790
- `SERVE_DIRECT`: **false**: 允许存储驱动器重定向到经过身份验证的 URL 以直接提供文件。目前,只支持 Minio/S3 通过签名 URL 提供支持,local 不会执行任何操作。

0 commit comments

Comments
 (0)