I'm trying to use the new multiple="multiple" attribute allowable on elements. So far this is supported by recent Gecko and WebKit browsers. I'm testing on Firefox 3.6 and Chrome 5.0.
I'm able to use it fine, and display the list of files (I used this as guidance). Rather frustratingly, however, it seems like it's impossible for the user to remove files from this list after they've been added. The only way is to click the "Browse..." button and choose a new set of files.
This is because the FileList object provided by the <input> element is readonly, as mentioned in the spec (can't link - see the FileAPI TR over at the W3C's website).
There are of course workaround, like keeping a list of the "removed" items, uploading everything anyway and then ignoring the "removed" items. This is a bit dirty and could make uploading unacceptably slow if lots of files are "removed".
Does anyone know of any other workarounds, or have any better ideas how to deal with this? The aim is to be able to use the "multiple" attribute, and allow users to remove files from the list prior to uploading.