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