fix: t-005 a t-0029 correctif

This commit is contained in:
2026-03-18 09:00:11 +01:00
parent bdb65a09ff
commit c12387ac94
16 changed files with 45 additions and 59 deletions

View File

@@ -1,9 +1,10 @@
export default defineEventHandler(async (event) => {
const req = event.node.req
const MAX_UPLOAD_BYTES = 100 * 1024 * 1024 // 100MB
let received = 0
for await (const chunk of req) {
if (received > MAX_UPLOAD_BYTES) throw createError({ statusCode: 413, statusMessage: "Fichier trop volumineux" })
received += chunk.length
}