I've got a problem when uploading large images to amazon s3. I'm using Rails 4 with carrierwave gem. I've see many similar posts here on stackoverflow that people answered to use carrierwave_direct. My problem is that I can't put one form into another, and need to send all the data together, including the image upload. The only option I see, is to limit file size, but I'm avoiding. Is there any way to increase this timeout on the server or any configuration file inside rails project?
4
votes
Can you elaborate a little bit on your setup? Why do you need to put one form into another? The general idea is that the processing should be done as a background process, not in the request handler. It would be helpful if you post the code of your form
– Dmitry
Most web servers have a config option for max file size upload. In nginx it looks like client_max_body_size 500M;
– Tyrel Richey
You could compress the image before sending, and then whenever you need to access it uncompress again.
– Elijah Murray
What is timing out? if it's your app, then how about pushing into a thread. I like to use the spawnling gem to toss the upload into it and then return to the user interface. I run a javascript check on status to poll whether the upload is done, (i use the DB record that references the file to indicate when it is done)
– bobbdelsol