Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using HTML5 size checking API, it is working fine in all browser except IE8 and IE9. I am getting this error : "SCRIPT5007: Unable to get value of the property '0': object is null or undefined." in IE8 and IE9, because IE8 and IE9 do not support "[0]" this syntax.

HTML5 File Size API Code:
C#
if (img.files[0].size < 524288) {
  return true;
}


Is there anyway to check image file size using Javascript in IE8 and IE9. If anyone know how to restrict image size using javascript then please give me some idea.
Posted

1 solution

As long as i know there is no way of doing this in ie < 10. Since they don't implement the file api http://caniuse.com/#search=file%20api[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900