Error: request entity too large

后端 未结 21 3465
无人共我
无人共我 2020-11-22 06:36

I\'m receiving the following error with express:

Error: request entity too large
    at module.exports (/Users/michaeljames/Documents/Projects/Proj/mean/node         


        
21条回答
  •  迷失自我
    2020-11-22 07:14

    For me the main trick is

    app.use(bodyParser.json({
      limit: '20mb'
    }));
    
    app.use(bodyParser.urlencoded({
      limit: '20mb',
      parameterLimit: 100000,
      extended: true 
    }));
    

    bodyParse.json first bodyParse.urlencoded second

提交回复
热议问题