Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

error in pluload on check image size : parameter 1 is not of type 'Blo asp.net MVC

$
0
0

hello to all

i use plupload for upload image, and i wnat check image width and height with this code

init: {
          FilesAdded: function (up, files) {
              jQuery.each(files, function (i, file) {
                  var reader = new FileReader();
                  reader.onload = function (e) {
                      var img = new Image;
                      img.src = e.target.result;
                      img.onload = function () {
                          // access image size here using this.width and this.height
                      }
                  }
                  reader.readAsDataURL(file)
              });
          }
      }

but i get this error

Uncaught TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.

how i can fix this problem ?

thank you for your help


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>