1

我的模型上有以下代码:

has_attached_file :photo, :styles => { :small => "150x150#" }, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => "/photo/:id/:style/:filename", :s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate }

上传图像时,仅保存原始图像,样式不起作用。没有生成小文件。

4

2 回答 2

0

假设您的 S3 凭据没问题,也许您应该尝试为小文件设置文件类型。像 :styles => { :small => "150x150#", :png }

于 2010-11-30T21:09:42.597 回答
0

您只需要将 gem 更新到最新最好的

于 2011-06-03T21:49:01.557 回答