I''m using file_column to allow image uploads to a site.
Model Version 1
class Cimage < ActiveRecord::Base
belongs_to :car
file_column :image
validates_presence_of :image
validates_presence_of :text
validates_file_format_of :image, :in => ["jpg", "gif"]
end
Model Version 2
class Cimage < ActiveRecord::Base
belongs_to :car
file_column :image, :magick => { :versions => { :thumb => { :size
=>
''150x100'' } } }
validates_presence_of :image
validates_presence_of :text
validates_file_format_of :image, :in => ["jpg", "gif"]
end
Version 1 works fine for both jpg and gif, but Version 2 will only be
successful for gifs. I get a validation error that ''Image was not a
valid image,'' every time a try to upload a jpg. Can anyone please
help shed some light on what the heck is going on here.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---