From 1807a4ddfda79df5fd25331a8e29cc591268662f Mon Sep 17 00:00:00 2001 From: ashim-hq Date: Mon, 20 Apr 2026 23:43:29 +0800 Subject: [PATCH] fix: raise maxParamLength to 500 for long filenames Fastify's find-my-way router defaults maxParamLength to 100 chars. Files with long names (e.g., stock photo filenames >100 chars) would return 404 on download because the :filename param exceeded the limit. --- apps/api/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 8e2891f2..8b8e4a6e 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -42,6 +42,7 @@ recoverInterruptedInstalls(); const app = Fastify({ logger: { level: env.LOG_LEVEL }, bodyLimit: env.MAX_UPLOAD_SIZE_MB > 0 ? env.MAX_UPLOAD_SIZE_MB * 1024 * 1024 : 1073741824, + maxParamLength: 500, }); app.setErrorHandler((error: Error & { statusCode?: number }, request, reply) => {