added support for monolith

This commit is contained in:
daniel31x13
2024-06-27 12:39:03 -04:00
parent afd5e5f036
commit 9fa9fe5db0
18 changed files with 312 additions and 775 deletions
+4 -2
View File
@@ -94,12 +94,14 @@ export default async function Index(req: NextApiRequest, res: NextApiResponse) {
// await uploadHandler(linkId, )
const MAX_UPLOAD_SIZE = Number(process.env.NEXT_PUBLIC_MAX_FILE_SIZE);
const MAX_UPLOAD_SIZE = Number(
process.env.NEXT_PUBLIC_MAX_FILE_BUFFER || 10
);
const form = formidable({
maxFields: 1,
maxFiles: 1,
maxFileSize: MAX_UPLOAD_SIZE || 30 * 1048576,
maxFileSize: MAX_UPLOAD_SIZE * 1048576,
});
form.parse(req, async (err, fields, files) => {