fix: increase body size limit for large imports (#43)

- Increase nginx client_max_body_size from 10MB to 50MB
- Add bodyLimit: 50MB to Fastify import route
- Allows importing exports with many base64-encoded images
This commit is contained in:
Daniel Volz
2026-01-18 09:05:57 +01:00
committed by GitHub
parent a190667320
commit 48ae48a165
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -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);
+2 -2
View File
@@ -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;