From a3642b204d48fbde3e6a060dca77893615242629 Mon Sep 17 00:00:00 2001 From: Coda <822628+mayli@users.noreply.github.com> Date: Sat, 3 Jun 2023 21:44:13 -0700 Subject: [PATCH] Fix: decode filename as utf8 on upload --- server/Server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/Server.js b/server/Server.js index a33b509f..5c6278cb 100644 --- a/server/Server.js +++ b/server/Server.js @@ -148,7 +148,10 @@ class Server { this.server = http.createServer(app) router.use(this.auth.cors) - router.use(fileUpload()) + router.use(fileUpload({ + defCharset: 'utf8', + defParamCharset: 'utf8' + })) router.use(express.urlencoded({ extended: true, limit: "5mb" })); router.use(express.json({ limit: "5mb" }))