This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Right now there's no easy way to walk a <form>'s form data set. Extending FormData to actually expose the form data seems like the obvious choice.
See also: http://wiki.whatwg.org/wiki/FormData
Bug 20887 proposes to add a File constructor. If we did, it seems like you could walk a <form>'s form data set, extract file data, and use it to create a File object. Should there be a more intuitive connection between File and FormData?
Arun, can you elaborate? I'm not sure I follow.
(Sorry for the tardy response: I was on vacation). I've mulled this over, and think a File constructor is sufficient; Bug 20887 now has some spec. text in place, and should hopefully come as no surprise: var f = new File(myBlob, "fooBarFile"); There shouldn't be too many other requirements that FormData has on File, so Comment 2 was out of turn I think.
See also bug 20038 by the way.
The other bug is fixed now. But since JavaScript has no iterators yet there's no way to iterate FormData thus far... Not sure if we want to keep this bug open for that or not. Once iterators are there we'll update a whole bunch of objects I think.
Anne, should this bug be yours at this point, since you own that API?
It already exposes contents, but iterating over the contents is awaiting some new IDL sugar. Let's just dupe this against that remaining bit. *** This bug has been marked as a duplicate of bug 23211 ***