I want to be able to preview a multiple images before it is uploaded, I found solution here that explane how to do that but for just single image.
I trying this :
function readURL(input)
{
if (input.files && input.files[0])
{
for (var i = 0, f; f = files[i]; i++) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah')
.attr('src', e.target.result)
.width(200)
.height(150);
};
reader.readAsDataURL(f);
}
}
}
Also, change the input to multiple
<input type='file' multiple onchange="readURL(this);" />
<img id="blah" src="#" alt="your image" />
Unfortunately, not working ! How can I do this with multiple images?