我在使用回形针时遇到了一些问题。当我在尺寸后面有一个“#”时(用于缩放和裁剪),我收到 422 错误。我的日志是这样说的:
Command :: convert '/tmp/**** (20130110)20130311-13571-xxasmt.png[0]' -auto-orient -resize "150x150#" '/tmp/**** (20130110)20130311-13571-xxasmt20130311-13571-1anrx0y'
[paperclip] An error was received while processing: #<Paperclip::Error: There was an error processing the thumbnail for **** (20130110)20130311-13571-xxasmt>
Completed 422 Unprocessable Entity in 2785ms (Views: 0.8ms | ActiveRecord: 9.1ms)
这是我在模型中的回形针代码:
has_attached_file :image,
:styles => {
:medium => "300x300#",
:thumb => "100x100>",
:standard => "150x150>"
},
:storage => :s3,
:s3_credentials => "#{Rails.root}/config/s3.yml",
:bucket => "convertkit",
:s3_protocol => "https"
我错过了什么吗?