There is a script for uploading images. He removes the preview, but the files remain the same. How to change the contents of FileReader, so when you remove the preview image were removed it would be from the object?
Upload your images
$(document).ready(function() { if (window.File && window.FileList && window.FileReader) { $("#files").on("change", function(e) { var files = e.target.files filesLength = files.length; for (var i = 0; i < filesLength; i++) { var f = files[i]; var fileReader = new FileReader(); fileReader.onload = (function(e) { var file = e.target; $("" + "

" + "
Remove image" + "").insertAfter("#files"); $(".remove").click(function(){ $(this).parent(".pip").remove(); }); }); fileReader.readAsDataURL(f); } }); } else { alert("Your browser doesn't support to File API") } });