2

I have an input file :

<input onchange="da_show_files();" id="file_send_chat" type="file" class="upload" name="file_send_chat[]" multiple="multiple" />

And my main problem is that I'd like to access (in order to remove) specific files in the input, but I'm only getting the last modified (added) file when using :

$('#file_send_chat').prop("files") or
$('#file_send_chat').files or
$('#file_send_chat').val()

The whole point is to be able to remove one file from the input itself, so that I can add it again (for a better user experience).

How can I do that ?

Thanks.

PS : da_show_files(); only show the filenames when uploading files.

Steve Chamaillard
  • 2,289
  • 17
  • 32
  • You cannot remove a file from the `FileList` as it's readonly http://stackoverflow.com/a/3162319/2300466, maybe you can just replace it http://stackoverflow.com/a/1043969/2300466 – Ahmad Ibrahim May 20 '15 at 17:48

0 Answers0