You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chris Sepic edited this page Aug 22, 2018
·
4 revisions
You can use a Rails custom validator to verify your image meets specific geometry dimensions requirements.
Grab a copy of the validator from https://gist.github.com/pioz/6b38e26c311d525fb48a and save it to your lib/ folder as file_geometry_validator.rb. Add the error translations to config/locales/en.yml or wherever is appropriate for your setup.
Then in your uploader you need to set an accessor attribute with the geometry of the image.