问题描述
我即将踏上一个爱好项目中,我会上传大量文件到S3。有些文件会很大50-100MB。我想用Heroku的,但可以在EC2上,而不是在需要时回退。
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.
有关这将Heroku的+ Carrierwave + S3的工作?或者有没有给档案上传限制?如果有啥好的选择?
Will Heroku + Carrierwave + S3 work for this? Or are there limitations to file uploads? If so what's a good alternative?
也很好奇,如果有任何酷上传库,比如uploadify但W / O型闪光灯。
Also curious if there are any cool uploading libraries like uploadify but w/o the flash.
谢谢!
推荐答案
我建议服用S3的直接上传功能的优势。这将允许用户直上传到您的S3帐户(以安全的方式),绕过上传来的Heroku的。这样可以使你Dynos自由地处理正常的请求,并避免了高文件上传处理CPU开销以及内存限制的问题。
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
这宝石似乎你要找的:https://github.com/dwilkie/carrierwave_direct
这篇关于上传在Heroku上的大文件Carrierwave的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!