Reputation: 6836
I'm trying to submit a form with a file to Node+Express server. I set the bodyParser limit to 5M:
app.use(express.bodyParser({ limit: '5mb' }));
It works fine on local machine. However on Heroku I get "Request Entity Too Large" error for files larger than 1M.
How does Heroku put this limit and how it can be changed?
EDIT: The actual error is generated by the nginx and not the node app:
Upvotes: 7
Views: 5104
Reputation: 6836
I forgot to post the resolution. The problem was only for that app. I tried to create a new app and it worked fine. So I think it was related to the specific server instance that the initial application was using. On another instance the problem didn't exist.
Upvotes: 3
Reputation: 19279
You might need to re-order you configuration statements, see this answer: https://stackoverflow.com/a/19965089/2942
Upvotes: 0