technoweenie / attachment_fu

Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
http://weblog.techno-weenie.net
MIT License
1.02k stars 337 forks source link

Validating image dimensions before save #28

Open chirantan opened 14 years ago

chirantan commented 14 years ago

When the image gets saved, the height and width of the image get saved in the model correctly. I have a requirement where I need to validate the dimension of the image. It has to be of precisely the same dimensions. But when I try to access height or width before save, it gives me nil.

Is there any way where I can achieve this? I can't find it.