Friday 27 July 2018

Unable to upload image larger than 5MB on a nodejs app with nginx.

Hey everyone! I'm developing a nodejs app but there's a problem when I put the app online.I have a form where it's possible to upload an image, and in localhost it always worked correctly, but now in Google Cloud Platform instance it isn't working.I am using nginx as a proxy for port 3000 which is where I have the nodejs app running.Initially, 'Error 413 Request Entity Too Large' occurred, but I was able to solve this by adding the lineclient_max_body_size 10M;to the nginx.conf configuration file.The problem now is that when uploading images larger than 5MB, error 413 is not returned, but image uploading is not done either.PS: I use the formidable to handle the data received from the server side.

Submitted July 27, 2018 at 05:56PM by ashestosnow8

No comments:

Post a Comment