Rails 直接上传到 Amazon S3 [英] Rails direct upload to Amazon S3

查看:36
本文介绍了Rails 直接上传到 Amazon S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望向我的 Rails 应用程序添加功能,以将文件直接上传到 Amazon S3.从我的研究来看,普遍的共识似乎是使用 s3-swf-upload-plugin.我已经使用该 gem 设置了一个示例应用程序,但仅允许选择单个文件,我无法让它运行良好.我还想创建一个记录后上传并使用回形针创建一个缩略图,我几乎找不到指导.

I'm looking to add functionality to my Rails app to upload files directly to Amazon S3. From my research the general consensus seems to be to use the s3-swf-upload-plugin. I've setup a sample app using that gem but I can't get it to play nice with only allowing the selection of a single file. I'd also like to create a record post upload and use paperclip to create a thumbnail for which I can find little guidance.

所以我的问题是:

(1) 我使用那个 gem 是否走在正确的轨道上,还是应该采取另一种方法?

(1) am I on the right track using that gem or should I be taking another appraoch?

(2) 是否有可供我参考的样本?

(2) are there any samples out there that I could use for reference?

如有任何帮助,我们将不胜感激.

Any assistance would be much appreciated.

克里斯

推荐答案

尝试一个名为 CarrierWaveDirect 的新 Gem它允许您使用 html 表单将文件直接上传到 S3,并轻松将图像处理移至后台进程

Try a new Gem called CarrierWaveDirect it allows you to upload files direct to S3 using a html form and easily move the image processing into a background process

这篇关于Rails 直接上传到 Amazon S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆