ruby on rails - How-to conform to a max/min width/height -
i using carrierwave (https://github.com/jnicklas/carrierwave). need make sure images conform maximum/minimum height , width? otherwise error should display.
should handled in uploader class or in model (possibly through custom validation method)?
you can validate image width/height on client side, not guarantee anything, because it's easy manipulate/circumvent.
for user friendliness: check on client side , give warning before uploading. data integrity, check on server side after upload.
Comments
Post a Comment