diff --git a/apps/file-q-and-a/nextjs/src/pages/api/process-file.ts b/apps/file-q-and-a/nextjs/src/pages/api/process-file.ts index 2d874d5..2b0d228 100644 --- a/apps/file-q-and-a/nextjs/src/pages/api/process-file.ts +++ b/apps/file-q-and-a/nextjs/src/pages/api/process-file.ts @@ -26,8 +26,10 @@ export default async function handler( } // Create a formidable instance to parse the request as a multipart form - const form = new formidable.IncomingForm(); - form.maxFileSize = 30 * 1024 * 1024; // Set the max file size to 30MB + const options = { + maxFileSize: 30 * 1024 * 1024 // Set the max file size to 30MB + }; + const form = formidable(options); try { const { fields, files } = await new Promise<{