Creating versions with file_column but only if file is image


#1

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?