【发布时间】:2011-03-10 19:13:47
【问题描述】:
我想从我的 S3 容器中读取照片的几何形状。
当它在我的本地时,这有效:
def photo_geometry(style = :original)
@geometry ||= {}
@geometry[style] ||= Paperclip::Geometry.from_file photo.path(style)
end
但是当我将模型切换到 S3 时它似乎不起作用。有什么建议吗?
更大的故事是,我正在尝试编写一些代码,允许我从 S3 中检索照片,允许用户裁剪它们,然后将它们重新上传回 S3 仍然由回形针分配。
编辑:
这是返回的错误:
Paperclip::NotIdentifiedByImageMagickError: photos/199/orig/greatReads.png is not recognized by the 'identify' command.
from /Users/daniellevine/Sites/hq_channel/vendor/gems/thoughtbot-paperclip-2.3.1/lib/paperclip/geometry.rb:24:in `from_file'
from /Users/daniellevine/Sites/hq_channel/app/models/photo.rb:68:in `photo_geometry'
from (irb):1
【问题讨论】:
标签: ruby-on-rails ruby amazon-s3 imagemagick paperclip