之前有一次有人上传了大文件导致gitea崩溃的情况,想知道怎么配置限制上传文件大小
Two different types of upload in Gitea (see Config Cheat Sheet for more info):
- If uploading to repository, change
FILE_MAX_SIZE = 3
under[repository.upload]
. - If uploading to issue/pull request, change
MAX_SIZE = 4
under[attachment]
.
Note: if using reverse proxy like nginx, you have to configure reverse proxy max upload size too. Otherwise, same issue will occur even with Gitea config change.
Ok, I tried it and succeeded. Thank you
1 Like