Forum: Ruby on Rails Creating versions with file_column but only if file is image

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mattias B. (Guest)
on 2006-01-08 13:46
I would like to create versions of images uploaded to a model that has a
file_column but only if the file is a image.

file_column :file, :magick => { :versions => {"thumb" => "64x64"}}

If I upload a txt file this will give me an error of "File invalid
image".


Any idears?
This topic is locked and can not be replied to.