我想从我的S3容器中读取照片的几何图形.
当它在我的地方,这工作:
def photo_geometry(style = :original) @geometry ||= {} @geometry[style] ||= Paperclip::Geometry.from_file photo.path(style) end
但是当我将模型切换到S3时,似乎不起作用.任何建议?
更大的故事是,我正在尝试编写一些代码,让我从S3中检索照片,允许用户裁剪它们,然后将其重新上传到仍然由paperclip分配的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