Rails 3 回形针 vs 载波 vs 蜻蜓 vs 附件 [英] Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu

查看:20
本文介绍了Rails 3 回形针 vs 载波 vs 蜻蜓 vs 附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 Rails 2.3.11、Ruby 1.9.2 应用升级到 Rails 3.0.10,但attachment_fu 不再有效.

I'm working on upgrading a Rails 2.3.11, Ruby 1.9.2 app to Rails 3.0.10, and attachment_fu no longer works.

我正在考虑改用回形针、carrierwave 或蜻蜓来上传文件,或者使用与 Rails 3 兼容的维护版本的attachment_fu.

I'm looking at changing to paperclip, carrierwave, or dragonfly for file uploads, or maybe a Rails 3 compatible, maintained version of attachment_fu.

就性能而言,这些选项中的哪一个最适合使用、维护得有多好、从attachment_fu 升级有多容易,以及它是否与Rails 3.1 兼容?每种方法的主要优点和缺点是什么?

Which of these options would be the best to use in terms of performance, how well maintained it is, how easy it is to upgrade from attachment_fu, and maybe is it going to be Rails 3.1 compatible? What are the major strengths and disadvantages of each one?

任何见解将不胜感激.

推荐答案

Paperclip 和 Carrierwave 我都用过,如果我是你,我会选择 Carrierwave.它灵活得多.我也喜欢这样一个事实,即它不会使您的模型与配置杂乱无章.您可以改为定义上传器类.它允许您轻松地重用、扩展等您的上传配置.

I've used both Paperclip and Carrierwave, and if I were you, I'd go for Carrierwave. It's a lot more flexible. I also love the fact that it doesnt clutter your models with configuration. You can define uploader classes instead. It allows you to easily reuse, extend etc your upload configuration.

你看过 Carrierwave railscast 吗?http://railscasts.com/episodes/253-carrierwave-file-uploads

Did you watch the Carrierwave railscast? http://railscasts.com/episodes/253-carrierwave-file-uploads

Paperclip 并不是一个糟糕的选择,它长期以来一直是最佳"选择.但 Carrierwave 看起来绝对是新一代 ;)

Paperclip is not a bad choice though, it's been the "best" choice for a long time. But Carrierwave definitely seems like the new generation ;)

这篇关于Rails 3 回形针 vs 载波 vs 蜻蜓 vs 附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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