Befor uploading Images to Server I want to get the height and width of Images. To do it, I use FileReader.
I tried to open over 30 Pictures, size > 3 MB.
After ca. 20 Pictures (i=20) by
img.src=res; i get:
JavaScript runtime error: Not enough storage is available to complete this operation.
How to remove img from storage?
img = null; does not help.
Best regards and thanks
Code:
var f = files[i];
//Item from input files
var oFReader = new window.FileReader();
oFReader.readAsDataURL(f);
oFReader.onload = function (oFrEvent) {
var res = oFrEvent.target.result;
var img = new Image();
img.onload = function () {
imgList.push({width:img.width, height:img.height})
img = null;
}
img.src = res;
}
After ca. 20 Pictures (i=20) by
img.src=res; i get:
JavaScript runtime error: Not enough storage is available to complete this operation.
How to remove img from storage?
img = null; does not help.
Best regards and thanks
Comment