2

I'm using Node/Express for my server and am trying to save photos from the client (mobile app) to the server, and am deployed using AWS elastic beanstalk. It works fine on AWS if I use small files (a few kb), and works fine if I use large files (several MB) if I run the server on my machine locally. However, I can't seem to get large files to save to the deployed AWS server properly. Is there a size limit by default on Elastic Beanstalk setups? I have the following line in my server code, which seems to work fine with I run the server locally.

app.use(express.limit('15mb'));

Thanks in advance for any help!

manihiki
  • 682
  • 2
  • 12
  • 22
  • I'm experiencing this problem as well. It doesn't seem that the files are reaching Express at all. Tried this http://stackoverflow.com/questions/18908426/increasing-client-max-body-size-in-nginx-conf-on-aws-elastic-beanstalk but it also had no impact. – Ben Gotow Dec 17 '13 at 07:11

1 Answers1

1

I had the same problem and was able to fix it with the answer here:

Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk

Basically, you need to set the client_max_body_size on nginx as the default for node.js elasticbeanstalk setup is pretty small.

Community
  • 1
  • 1
noopdog
  • 11
  • 3