Skip to content
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

413 Error: request entity too large #133

Closed
andreacampaci opened this issue Oct 17, 2019 · 2 comments
Closed

413 Error: request entity too large #133

andreacampaci opened this issue Oct 17, 2019 · 2 comments

Comments

@andreacampaci
Copy link

Hi,
When I try to do a POST with base64 image I got this error:

Request Method:	
POST	
Status Code:	
413 Payload Too Large	
Remote Address:	
127.0.0.1:8080
Referrer Policy:
no-referrer-when-downgrade
PayloadTooLargeError: request entity too large

Please, can you tell me how to increase the payload's limit?

Thank you

Andrea

@smollweide
Copy link
Owner

Hello Andrea,

replace of
app.use(bodyParser.json());

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

In the AppController should solve the problem. Could you please test it with your configuration?

https://github.com/smollweide/node-mock-server/blob/master/lib/controller/AppController.js#L97

Greetings and thank you

@smollweide
Copy link
Owner

Hi @andreacampaci,
done with release 0.25.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants