Created
May 23, 2016 08:45
-
-
Save strongant/66ce483917a1795b52a77034c4d8a21e to your computer and use it in GitHub Desktop.
express4中使用body-parser通过post请求,默认接收10kb,修改默认值
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//调整express默认允许的大小 | |
app.use(bodyParser.json({ | |
limit: '1024mb' | |
})); | |
app.use(bodyParser.urlencoded({ | |
limit: '1024mb', | |
extended: true | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment