[imps] how about FileList files.remove(item)?

李白|字一日 calidion at gmail.com
Thu Sep 11 00:02:12 PDT 2014


hi, all

i am not sure if it is a proper place for me to post.
if you are bothed, please ignore this message.

I am recently implementing a function that needs to be able to select and
unselect images.
current input file is ok for select images,  and with FileReader it is very
easy to show images selected.

But when i want to unselect and remove specific images, it becomes a lot
complicated.

I binged (google is blocked from china currently) the web, and found the
same question:
http://stackoverflow.com/questions/9575877/file-upload-remove-value-from-input-box

the solution is to dynamically create hidden input to contain the files.

it seems ok but too complicated to do so.

I also checked the FileList Api, found there is no method to remove the
files separately.

https://developer.mozilla.org/en/docs/Web/API/FileList

as more and more ajax based web app will come up, the needs for unselect a
uploading image will become more and more common.

so I would like to propose that web support FileList remove a file .

thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/implementors-whatwg.org/attachments/20140911/5c962db6/attachment.htm>


More information about the Implementors mailing list