Paperclip configurations | Old Attachments

ⅰ亾dé卋堺 提交于 2019-12-23 05:15:08

问题


I recently changed my Paperclip configurations:

New Configs:

  has_attached_file :scr, :styles => { :index => "215x165#", :show => "900" },
                    processors: [:thumbnail, :compression],
                    :content_type => { :content_type => ["image/jpg", "image/png"] }

Old Configs:

has_attached_file :scr, :styles => { :index => "215x165#

For Showing the Pictures i need on my App i use the :show attribute.

The Problem is that my app has already a lot of pictures and upon changing the configs the pictures are not longer visible (Cause the cropping and configuration is done when uploading).

Is there a way to Re-Save those Pictures ?

I tried

Screen.find_each(&:save)

where "Screen" the pictures, but it didn't work.

What am i missing?


回答1:


Try running rake paperclip:refresh CLASS=Screen



来源:https://stackoverflow.com/questions/21048735/paperclip-configurations-old-attachments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!