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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -