From bf046a715cd6897792b2f1582d076c055063bf57 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sun, 6 Apr 2025 21:33:47 +0200 Subject: [PATCH] fix(medias): upload size limited by nginx to 1mb (#2813) --- nginx.conf | 1 + packages/validation/src/media.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/nginx.conf b/nginx.conf index dbfeba55a..e53f7b740 100644 --- a/nginx.conf +++ b/nginx.conf @@ -22,6 +22,7 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + client_max_body_size 32M; } } } \ No newline at end of file diff --git a/packages/validation/src/media.ts b/packages/validation/src/media.ts index 9fd47256f..98f186c3d 100644 --- a/packages/validation/src/media.ts +++ b/packages/validation/src/media.ts @@ -26,6 +26,7 @@ export const mediaUploadSchema = zfd.formData({ } if (value.size > 1024 * 1024 * 32) { + // Don't forget to update the limit in nginx.conf (client_max_body_size) return context.addIssue({ code: "custom", params: createCustomErrorParams({