I'm happily using attachment_fu to handle file uploads and thumbnail creation. However, for some (but not all!) cases I would like to suppress the creation of thumbnails.
How would I hack attachment_fu to do this?
Specifics: I have a traditional attachment_fu model
class Pic < ActiveRecord::Base
has_attachment :content_type => :image, :storage => :s3, :resize_to => '200x600>',
:thumbnails => { :thumb48 => [48,48],
:thumb32 => [32,32],
:thumb22 => [22,22] }
validates_as_attachment
end
The user specifies the file to be uploaded in a form using a file input, and submits the form to an action where the pic is created using
@pic = Pic.new(params[:pic])
In certain cases I'd like to be able to do something like
@pic = Pic.new(params[:pic], {:generate_thumbnails => false})
and prevent the thumbnails from being generated.