From 3ae2db5d9b36fe3dcd4372ddcd32aa573ea59aa6 Mon Sep 17 00:00:00 2001 From: C4illin Date: Tue, 9 Jul 2024 20:26:48 +0200 Subject: [PATCH] fix: increase max request body to support large uploads issue #64 --- src/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 47b82d3..c70d056 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -21,9 +21,6 @@ import { } from "./helpers/normalizeFiletype"; import "./helpers/printVersions"; - - - const db = new Database("./data/mydb.sqlite", { create: true }); const uploadsDir = "./data/uploads/"; const outputDir = "./data/output/"; @@ -104,7 +101,11 @@ interface IJobs { // enable WAL mode db.exec("PRAGMA journal_mode = WAL;"); -const app = new Elysia() +const app = new Elysia({ + serve: { + maxRequestBodySize: Number.MAX_SAFE_INTEGER, + }, +}) .use(cookie()) .use(html()) .use(