From 465b481aa777b29f5443e2bab9dcb651551ecad3 Mon Sep 17 00:00:00 2001 From: liudongqi Date: Wed, 4 Sep 2024 18:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20nodejs=20request=20enti?= =?UTF-8?q?ty=20too=20large?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index cd7e216..3117b20 100644 --- a/app.js +++ b/app.js @@ -16,8 +16,8 @@ const app = express(); /* 配置框架环境 S */ // 设置 express 的中间件 body-parser -app.use(bodyParser.json('100mb')); -app.use(bodyParser.urlencoded({extended: true})); +app.use(bodyParser.json('5000mb')); +app.use(bodyParser.urlencoded({limit: '5000mb', extended: true})); // 设置 public 为静态文件的存放文件夹 // app.use('/public', express.static('public'));