Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading large files on Heroku with Carrierwave

I'm about to embark on a hobby project where I'll upload lots of files to S3. Some of the files will be large 50-100MB. I would like to use Heroku but can fallback on EC2 instead if needed.

Will Heroku + Carrierwave + S3 work for this? Or are there limitations to file uploads? If so what's a good alternative?

Also curious if there are any cool uploading libraries like uploadify but w/o the flash.

Thanks!

like image 965
Adam O'Connor Avatar asked Dec 04 '22 06:12

Adam O'Connor


1 Answers

I recommend taking advantage of S3's direct-upload feature. This will allow your users to upload straight to your S3 account (in a secure fashion), bypassing the upload to Heroku at all. This keeps your Dynos free to handle normal requests and avoids the high file-upload processing CPU costs as well as memory limit problems.

http://aws.amazon.com/articles/1434

This gem appears to just what you're looking for: https://github.com/dwilkie/carrierwave_direct

like image 99
coreyward Avatar answered Dec 26 '22 00:12

coreyward