I got a Jquery function that read a FilesList and display in an IMG html object the image.
function load_images(files) {
for (var i = 0; i < files.length; i++) {
// Validate the image type
if(validate_file(files[i])) {
var reader = new FileReader();
reader.onload = function(e) {
$(".upload_thumbnails").append(render_thumb(e.target.result, i)); // Return a string with the img object
};
}
reader.readAsDataURL(f);
}
}
But my images are not append in the sequential order of the fileList. The fileList (var files) is implement by an multiple input file html object.
Do you have any idea ?