refactor(storage): enforce per-user max_file_bytes limit on upload pipelines (#20)
CD — Deployment / deploy (push) Successful in 22s

* Validate Content-Length on single-part upload route against user limit
* Check total expected size on chunked upload session creation
* Re-evaluate user limit at finalization to reject dynamic quota reductions
* Clean up temporary files on payload size rejection (413)
* Add 60-second polling interval for periodic fetching of messages and images

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #20
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
This commit was merged in pull request #20.
This commit is contained in:
Gitea Actions
2026-10-31 10:16:28 +00:00
committed by Esiah
co-authored by Esiah
parent b52417053f
commit 3542b33c89
12 changed files with 907 additions and 34 deletions
+5 -1
View File
@@ -13,6 +13,10 @@ proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_read_timeout 60s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
# La finalisation d'un gros envoi resumable lit et hache le fichier complet
# avant de repondre : 120 s laisse la marge necessaire, sans depasser la
# limite de reponse de Cloudflare (~100 s).
# Aligne sur la borne de depot du Cloud.
client_max_body_size 5g;