An - in my world easy an clean solution - is, to set the file inputs files to a clear FileList
.
Since we can not create a FileList
directly - I user DataTransfer
as "hack"
@$input[0].files=new DataTransfer().files
or
file_input_node.files=new DataTransfer().files