-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option to increase max file size supported by body-parser #130
Comments
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
Let me know if that fixes the issue. |
@75lb your approach helped me, many thanks! It should be mentioned that prior to run your code, I grabbed the latest version of |
OK, I'm glad we isolated the issue. However, I still need to fix lws-body-parser. I'll look into adding a new option which increases the maximum size of files supported by body-parser. Let me know if you find any other issues! 👍 |
@75lb option for increasing size will be great! P.S. It will be good to have an exclude flag for stack middleware also. |
Excluding flag is a great idea. And a option for increasing the limit would be nice, either. Still needing help on this? |
yes, both features are required - I will write some instructions later.. In the meantime, feel free to try some ideas! |
…rver#130 Upgrade deps, dates, CI
Fixed and released in local-web-server v5.4.0 |
Middleware 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)
The text was updated successfully, but these errors were encountered: