I want to take the picture and name but it does not work.
<script>
var imagesPreview = function(input, append) {
if(input.files) {
for(i = 0; i < input.files.length; i++) {
var filename = input.files.item(i).name;
var reader = new FileReader();
$(reader).load(function(e){
$(append).append(
'<div class="frame col-md-3" align="center">'+
'<img src="'+e.target.result+'" class="img">'+
'<div style="word-wrap:break-word; margin-top:5px">'+filename+'</div>'+
'</div>'
);
})
reader.readAsDataURL(input.files[i]);
}
}
};
$('#images').on('change', function(e) {
imagesPreview(this, '.data-image');
});
</script>