node.js body-parser 为什么会报错 bodyParser.raw is not a function?
ringa_lee
ringa_lee 2017-04-17 14:36:52
0
2
801

很简单的一段代码,想要设置raw的entity大小,因为上传图片导致node request entity too large

修改:

app.use(bodyParser.json({limit: "50mb"}));
app.use(bodyParser.raw({limit: "50mb"}));//这里出错了,bodyParser.raw is not a function?
app.use(bodyParser.urlencoded({limit: "50mb", extended: true, parameterLimit:50000}));
ringa_lee
ringa_lee

ringa_lee

reply all(2)
PHPzhong

What version is yourbody-parser?

Peter_Zhu

These middlewares have been separated from connect after exprss4.0

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template