JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="file" multiple='multiple'>
<div id="thumbs"></div>
JavaScript
$('input[type="file"]').change(function() {
$('#thumbs').html('');
$.each(this.files, function() {
readURL(this);
})
});
function readURL(file) {
var reader = new FileReader();
reader.onload = function(e) {
$('#thumbs').append('<img src="' + e.target.result + '" width="20%"><p>'+e.name+'</p>')
$('#quantity').text(i)
}
reader.readAsDataURL(file);
}