0

I'm uploading files ajax jquery, and i need clear filelist array. How i can clear FileList array by input id or other options please;

This code:

document.getElementById("myInputFileID").value=null;

Not working

YaMus
  • 51
  • 5
  • That should work, there is something else in your code that is preventing this from happening. Add [mcve] or it's not possible to help you further. – Esko Jul 18 '22 at 09:12
  • Sorry, I found a solution in the topic you threw off, thanks a lot – YaMus Jul 19 '22 at 09:44

1 Answers1

0
var $input = $("#control");

$input.replaceWith($input.val('').clone(true));

https://stackoverflow.com/a/47795271/15331960

YaMus
  • 51
  • 5