How to remember input[type=file] old files when you add a new one?

Welcome. There are input:
<input class="uploader-add js-upload-add" type="file" accept="image/gif,image/png,image/jpeg,image/pjpeg" name="image[]" id="image" multiple="multiple">

And there is code:
$('input[type=file][id=image]').on('change', function(){
 var curFiles = $(this)[0].files;
 var count_files = curFiles.length;
 var preview_count = $('.js-preview').length;

 for(var i = 0; i < count_files; i++) {
 var id = i + preview_count;

 $(".uploader").before('<div class="preview js-preview column" id="'+id+'" draggable="true" ondragenter="return dragEnter(event)" your ondrop="return dragDrop(event)" ondragover="return dragOver(event)" ondragstart="return dragStart(event)"><div id="drag" class="preview-i ui-widget ui-corner-all"><i class="preview-delete js-preview-delete"></i></div><img class="js-preview-img" src name=" " id=" " style="height: 75px;"><input type="hidden" name="photos[]" value id></div>');

 $('.js-preview#'+id+' input').attr('value', window.URL.createObjectURL(curFiles[i]));
 $('.js-preview#'+id+' input').attr('id', curFiles[i].name);
 $('.js-preview#'+id+' img').attr('src', window.URL.createObjectURL(curFiles[i]));

Corny adds code files and shows preview. But there is a catch. When you add a new file input, it remembers only added. And how to make sure that he kept the files that were selected before?
Thank you!
June 14th 19 at 18:00
3 answers
June 14th 19 at 18:02
No way.
But you can add new input, for example.
June 14th 19 at 18:04
If the files are already on the server, you have to remember a list of paths.
Keep them invisible in any input or generate input for each new file, as advised above.
June 14th 19 at 18:06
direct festival of some sort )

UPD: I have solved the issue here, perhaps you will also work for this solution.
Just want to implement the same boot festival photos, like on Craigslist. - Evan commented on June 14th 19 at 18:09
I suspect that there is implemented a little differently. - lily.Kozey commented on June 14th 19 at 18:12

Find more questions by tags HTMLjQuery