paperclip-meta icon indicating copy to clipboard operation
paperclip-meta copied to clipboard

Add ability to disable paperclip-meta via an option

Open gmcnaughton opened this issue 14 years ago • 1 comments

I'm using STI to store info about attachments (images and non-images) in the DB. Because it's STI, the table includes one meta column shared by both classes.

When I upload a non-image, paperclip-meta tries to process it and causes "identify: no decode delegate" warnings in the logs (Mac OSX Lion, ImageMagick 6.7.4-6).

I would like to be able to disable paperclip-meta for attachments even when a meta column is present in the DB. For instance:

class FileAttachment < ActiveRecord::Base
  # Don't process non-images
  has_attached_file :attachment, :meta => lambda { |s| ... }, :styles => lambda { |s| ... } 
end

Is that possible? Maybe there's a way, I just didn't see it in the docs.

Edit: ala http://stackoverflow.com/questions/5289674/paperclip-process-images-only, only controlling whether or not meta info is loaded instead of which styles get generated.

gmcnaughton avatar Feb 08 '12 22:02 gmcnaughton

No, as for now there no way to disable paperclip-meta. Scheduled for v0.4.0

y8 avatar Feb 08 '12 23:02 y8