Server.js: Let next.js handle file uploads through internal-api routes

This commit is contained in:
mikiher 2026-06-23 14:08:16 +03:00
parent 9b92b5de34
commit 56e60b8420

View file

@ -302,7 +302,9 @@ class Server {
this.server = http.createServer(app) this.server = http.createServer(app)
// Skip file upload parsing for internal-api routes (Next.js proxies read multipart bodies).
router.use( router.use(
/^(?!\/internal-api).*/,
fileUpload({ fileUpload({
defCharset: 'utf8', defCharset: 'utf8',
defParamCharset: 'utf8', defParamCharset: 'utf8',