Reputation: 1103
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]);
}
}
Upvotes: 1
Views: 2790
Reputation: 2837
I've had a similar problem in the past. FileReader
is not yet supported in IE:
You might need to rework your solution if IE support is required to include a regular file upload.
Upvotes: 2