Bug 26287 - Unable to remove individual files from an multiple file input with javascript
Summary: Unable to remove individual files from an multiple file input with javascript
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-06-09 21:23 PDT by Chris Hynes
Modified: 2017-07-31 14:49 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hynes 2009-06-09 21:23:17 PDT
When creating a page that allows the user to select files and then see a list of the files selected (in html on the page), javascript code can only remove the entire file input, thus removing all files. With single file inputs this is fine, as a remove link can remove the file inputs from the page one by one. The current implementation of multiple file inputs makes this unworkable, as removing the file input removes all of the files and there is no way to remove just one via script.

I'd suggest a remove method on the files array or an individual file object.
Comment 1 Mark Rowe (bdash) 2009-06-09 23:37:44 PDT
<rdar://problem/6960125>
Comment 2 Chris Hynes 2009-06-18 07:02:22 PDT
To be compatible with the w3c FileUpload working draft (http://dev.w3.org/2006/webapi/FileUpload/publish/FileUpload.html#FileList-if), this should be files.removeItem(index).
Comment 3 Brian Burg 2017-07-31 14:49:31 PDT
removeItem was removed from the spec, closing.