Paperclip: Is that possible to recreate a deleted thumbnail without uploading the original image again?
I use Paperclip like this:
class Asset < ActiveRecord::Base
has_attached_file :asset, :styles => { :thumb => "80x80>开发者_运维知识库;" }, ...
When an image is uploaded, a thumbnail is created successfully.
Suppose, that for some reason, a thumbnail was deleted from the file system.
Is that possible to recreate the thumbnail without uploading the original image again ?
I tried:
Asset.find(16).save # => true
but the thumbnail wasn't created in the file system.
Have you tried the reprocess! method? Something like
Asset.find(16).asset.reprocess!
精彩评论