diff --git a/backend/src/routes/export.ts b/backend/src/routes/export.ts index cc27506..494e74c 100644 --- a/backend/src/routes/export.ts +++ b/backend/src/routes/export.ts @@ -389,6 +389,13 @@ export async function exportRoutes(app: FastifyInstance) { // --------------------------------------------------------------------------- app.post( "/import", + { + config: { + // Increase body limit to 50MB to handle exports with base64 images + rawBody: true, + }, + bodyLimit: 50 * 1024 * 1024, // 50 MB + }, async (request, reply) => { const userId = await getUserId(request, reply); diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 1c74a2f..f2cbffa 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -12,8 +12,8 @@ server { add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; - # Allow larger file uploads (for medication images) - client_max_body_size 10M; + # Allow larger file uploads (for medication images and data import/export) + client_max_body_size 50M; location / { try_files $uri /index.html;