From 2fd32385769a0f3dea8fc1a7abbbf74360813ef9 Mon Sep 17 00:00:00 2001 From: Coda <822628+mayli@users.noreply.github.com> Date: Sun, 4 Jun 2023 15:56:41 -0700 Subject: [PATCH 1/2] Fix: useTempFiles=true, upload use tmp instead of ram --- server/Server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/Server.js b/server/Server.js index 5c6278cb..009c6556 100644 --- a/server/Server.js +++ b/server/Server.js @@ -150,7 +150,8 @@ class Server { router.use(this.auth.cors) router.use(fileUpload({ defCharset: 'utf8', - defParamCharset: 'utf8' + defParamCharset: 'utf8', + useTempFiles: true, })) router.use(express.urlencoded({ extended: true, limit: "5mb" })); router.use(express.json({ limit: "5mb" })) From 5a01be1ee31a47be1390f59c9c23bcb1bab3cbcf Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 6 Jun 2023 15:40:52 -0500 Subject: [PATCH 2/2] Add tempFileDir for uploads --- server/Server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Server.js b/server/Server.js index 009c6556..40be406e 100644 --- a/server/Server.js +++ b/server/Server.js @@ -152,6 +152,7 @@ class Server { defCharset: 'utf8', defParamCharset: 'utf8', useTempFiles: true, + tempFileDir: Path.join(global.MetadataPath, 'tmp') })) router.use(express.urlencoded({ extended: true, limit: "5mb" })); router.use(express.json({ limit: "5mb" }))