I'd like to revive the "Proposal for sending multiple files via
XMLHttpRequest.send()" thread
started by Jian Li back in September.

As pointed out on that thread, sending a JS array of strings and File
references isn't going
to fly due to an array of strings already having meaning.

That thread concluded with Jonas Sicking saying:

> I definitely think that we need to add some way of sending a stream
> that is a concatenation of strings, binary data, and files, without
> requiring the files to be read.

What should this look like?  Should there be a new global constructor for an
object that supports methods like appendText and appendFile?  Like this:

var data = new UploadData;
data.appendText("foo");
data.appendFile(fileRef);
xhr.send(data);

I like the idea of creating a primitive that does not enforce any encoding.

Thoughts?
-Darin

Reply via email to