File size too large error
I have installed this project on AWS Elastic beanstalk. Have added s3 adapter in parse server and configured everything. The app is able to uploaded images into the bucket and I have confirmed it.
Our app lets users record video and upload it to backend - with parse server this is failing. The video file size is around 1-5MB, I see this error in the server logs
2016/05/03 01:47:56 [error] 3301#0: *189 client intended to send too large body: 1097919 bytes, client: 10.186.165.111, server: , request: "POST /parse/files/ADAF1714-9C6E-4EEC-BCDE-0405F2EBB50E.mp4 HTTP/1.1", host: "api.snapchat.com" 2016/05/03 01:48:57 [error] 3301#0: *255 client intended to send too large body: 1097919 bytes, client: 10.186.165.111, server: , request: "POST /parse/files/ADAF1714-9C6E-4EEC-BCDE-0405F2EBB50E.mp4 HTTP/1.1", host: "api.snapchat.com"
Any idea how to increase file size limit? Or am i doing something wrong?
Body Parser is rejecting the request because its too large. By default, an express app will have a request body limit of 100 KB. You can increase this limit yourself.
var bodyParser = require('body-parser'); app.use(bodyParser.json({limit: '50mb'})); app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
I think this issue is fixed in parse latest version, not sure though. https://github.com/ParsePlatform/parse-server/issues/536
Using an update parse server version would also work. Version 2.2.22 while writing this.