A
A
AveConstantis2021-06-07 15:29:06
JavaScript
AveConstantis, 2021-06-07 15:29:06

How to delete a file from the number of attached files on click?

How can you click on an element (I did the layout and output successfully), you can remove them from those attached to the file input?
60be10de2f93c001760042.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vovash, 2021-06-07
@V0vash

//получаем массив файлов
let newFileList = Array.from(document.getElementById('_INPUT').files);
// удаляем конкретный файл
newFileList.splice(_idx,1);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question