Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

413 错误:request entity too large

$
0
0

客户端提交数据的时候出现如下错误:

request entity too large

413

Error: request entity too large at readStream (F:\mypro\test\node_modules\body-parser\node_modules\raw-body\index.js:196:17) at getRawBody (F:\mypro\test\node_modules\body-parser\node_modules\raw-body\index.js:106:12) at read (F:\mypro\test\node_modules\body-parser\lib\read.js:76:3) at urlencodedParser (F:\mypro\test\node_modules\body-parser\lib\types\urlencoded.js:115:5) at Layer.handle [as handle_request] (F:\mypro\test\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (F:\mypro\test\node_modules\express\lib\router\index.js:312:13) at F:\mypro\test\node_modules\express\lib\router\index.js:280:7 at Function.process_params (F:\mypro\test\node_modules\express\lib\router\index.js:330:12) at next (F:\mypro\test\node_modules\express\lib\router\index.js:271:10) at jsonParser (F:\mypro\test\node_modules\body-parser\lib\types\json.js:112:7) at Layer.handle [as handle_request] (F:\mypro\test\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (F:\mypro\test\node_modules\express\lib\router\index.js:312:13) at F:\mypro\test\node_modules\express\lib\router\index.js:280:7 at Function.process_params (F:\mypro\test\node_modules\express\lib\router\index.js:330:12) at next (F:\mypro\test\node_modules\express\lib\router\index.js:271:10) at logger (F:\mypro\test\node_modules\morgan\index.js:144:5)

使用网上的方法修改bodyparse的limit,没有效果 app.use(bodyParser.json({limit: ‘50mb’})); app.use(bodyParser.urlencoded({limit: ‘50mb’, extended: true}));

这个怎么解决啊


Viewing all articles
Browse latest Browse all 14821

Trending Articles