Selected file list item in input is not removed

0

Well, I use the link codes below to make a list of files that I selected from a file-type input. So far so good. When you remove an item from the list, everything seems to go smoothly. Maaaaas ... When the files are uploaded to the server, the item that was removed is still being sent.

link

Any ideas how to solve this?

    
asked by anonymous 18.11.2016 / 01:08

1 answer

0

The reason this is happening is that you are removing only the item from the DOM you created, just the line with the thumbnail and the filename, you are not removing the file from the value of <input type="file" /> .

I have searched the subject and this value returned by html5 api is FileList which actually has nothing list, is an object, and that object is readonly .

Sources:

18.11.2016 / 01:32