Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

A127 file upload fails with a http 413 for just 318kb of file

Not applicable

I have this file upload api (multipart/form-data) and I run into a http 413 when I upload a 318 kb json file.

{
  "expected": 313066,
  "length": 313066,
  "limit": 102400,
  "status": 413,
  "statusCode": 413,
  "message": "request entity too large",
  "type": "entity.too.large"
}

Swagger-node uses multer internally. And multer doesn't really impose any restrictions.https://github.com/expressjs/multer#limits - it's infinity by default.

and neither do you, in swagger tools, https://github.com/apigee-127/swagger-tools/blob/master/middleware/swagger-metadata.js#L41, impose any limits.

I run express 4, so body parser is ruled out.

I am running on localhost, no nginx or any other proxy in between.

0 10 10.8K
10 REPLIES 10