MEANJS : 413 (Request Entity Too Large)

后端 未结 3 1420
清歌不尽
清歌不尽 2021-01-11 13:55

I am using a MEANJS stack, I upload an image using ng-flow and save the imgsrc as base64 url.

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARkAAACzCAYAAAC94Gg

3条回答
  •  渐次进展
    2021-01-11 14:01

    You can add following to express config:

    app.use(bodyParser.urlencoded({limit: '50mb'}));
    app.use(bodyParser.json({limit: '50mb'}));
    

    Basically you need to configure Express webserver to accept bigger request size. Replace 50mb with whatever maxsize you want to accept.

    Hope this helps!!!

提交回复
热议问题