I am making a plugin which allows user to upload images, Here is a brief summary of how it works.
It uses an <input type="file" name="images[]" multiple>
and then I use jQuery in which I handle the 'change' event, so that when user has selected images in the dialog. They show up in a div on my page in the form of thumbnails.
What I am trying to do is I want to give user the ability to remove images that they didn't mean to select.
At first I tried using single file select elements and when user would select a file, a new file select element would show up. That way I was just able to remove that element. But there was a limitation of being able to select just one file.
So here's what I want to know: how can I use multiple file select elements, and still be able to remove specific files once the user has selected them? I wish to do this all on the client side.