0

here is my problem i have been using ken do-control upload control to upload my images and the real problem is i want to set validation that user should upload image in 35 mm*45 mm.and in ken do upload events i have given a function Events(events => .Select("onImageSelect")and in function function onImageSelect(e) { if (e.files[0].width == 35||e.files[0].height == 45) { return true; } but i am getting width and height undefined

mc110
  • 2,825
  • 5
  • 20
  • 21
user2756921
  • 47
  • 2
  • 10
  • 1
    That's because those properties do not exist on the object you are referencing. [Read this](http://docs.telerik.com/kendo-ui/api/web/upload#events-select)! Also, you do know that using 35 in your code means 35 __pixels__, not 35mm? – Brett Jun 06 '14 at 15:34
  • thnks brett i want user to upload the picture of following dimension 35mm x 45mm and i don't know how to get the image size in mvc or in kendo script – user2756921 Jun 10 '14 at 04:47
  • Read this [answer](http://stackoverflow.com/questions/2865017/get-image-dimensions-using-javascript-during-file-upload). Also, you can search for a millimeter to pixel converter online, but to save you the trouble, 35mm ≈ 132px and 45mm ≈ 170px. – Brett Jun 10 '14 at 12:28

0 Answers0