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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user