add option to increase max file size supported by body-parser
See original GitHub issueMiddleware error
PayloadTooLargeError: request entity too large at readStream
The transferred entity is 42Mb, so how could I increase amount of transferred data via lws config?
Error message:
Middleware error PayloadTooLargeError: request entity too large at readStream (/usr/local/lib/node_modules/local-web-server/node_modules/raw-body/index.js:155:17) at executor (/usr/local/lib/node_modules/local-web-server/node_modules/raw-body/index.js:112:5) at new Promise (<anonymous>) at getRawBody (/usr/local/lib/node_modules/local-web-server/node_modules/raw-body/index.js:111:10) at /usr/local/lib/node_modules/local-web-server/node_modules/co-body/lib/json.js:41:14 at process._tickCallback (internal/process/next_tick.js:68:7)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to change max size for body-parser/express?
You can use this with Express 4 to limit request body size/Upload file size, instead of express.json() and express.urlencoded(), ...
Read more >Increasing max file size - Google Groups
What is the proper way to increase the maximum file size allowed for file uploads? I'm currently seeing this result using the loopback-component-storage ......
Read more >Multer: Easily upload files with Node.js and Express
Building an app with Multer support; Creating our frontend; Install and ... First, create a folder called file-upload-example , then create ...
Read more >body-parser-xml - npm
Adds XML parsing to the body-parser library, so you can convert incoming XML data into a ... limit. Controls the maximum request body...
Read more >Express body-parser middleware
The bodyParser object exposes various factories to create middlewares. ... limit. Controls the maximum request body size. If this is a number, then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@75lb option for increasing size will be great!
P.S. It will be good to have an exclude flag for stack middleware also.
Try omitting lws-body-parser from the stack…
if you run this command you’ll see the default middleware stack (the list of middleware plugins that are active by default):
To omit lws-body-parser (which i suspect is causing the issue) from the middleware stack, run this command (i skipped the
lws-
prefix from each plugin name - it is optional):Let me know if that fixes the issue.