Rails 3.0.1 and Paperclip - Image not resizing
-
29-09-2019 - |
문제
I have the following code on my model:
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 }
When an image is uploaded, only the original is saved, the styles are not working. There is no small file generated.
해결책
You just need to update the gem to the latest and greatest
다른 팁
Assuming that your S3 credentials are ok, maybe you should try setting a file type for the small file. Something like :styles => { :small => "150x150#", :png }
제휴하지 않습니다 StackOverflow