Use a different model for the zip file
OR
Use a different column for the zip file.
file_column :file, :magick => {
:versions => { "thumb" => "50x50",
"medium" => "640x480>" }
}
That basically says that you will resize that file, no matter what type
it is. So you''ll need to use a different column or model.
Or you could catch the exception thrown and ignore it :) *HACK*
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Alexander
Sent: Friday, February 24, 2006 7:41 AM
To: rails@lists.rubyonrails.org
Subject: [Rails] File Column
Has anyone any experiance with the FileColumn plugin. I''m trying to
create thumbnails, and also alow non picture uploads. Here''s some
working code, but if I try and upload a zip, it says ''File invalid
image''. Is there anyway of having both image uploads (and thumbnail
generation) while also allowing non image uploads?
class Entry < ActiveRecord::Base
validates_presence_of :name, :file
validates_uniqueness_of :name
file_column :file, :magick => {
:versions => { "thumb" => "50x50",
"medium" => "640x480>" }
}
end
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails