I am not able to have below code working in IE. It works fine on Firefox and Chrome.
Anyone can help, how can make this function work on IE?
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#img_prev')
.attr('src', e.target.result)
.width(160)
.height(152);
};
reader.readAsDataURL(input.files[0]);
}
}
I’ve had a similar problem in the past.
FileReaderis not yet supported in IE:http://html5demos.com/
You might need to rework your solution if IE support is required to include a regular file upload.