W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: Proposal for sending multiple files via XMLHttpRequest.send()

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 20 Oct 2009 10:37:30 +0200
To: "Darin Fisher" <darin@chromium.org>, public-webapps@w3.org
Message-ID: <op.u13bkszk64w2qv@annevk-t60>
On Tue, 20 Oct 2009 08:55:21 +0200, Darin Fisher <darin@chromium.org>  
wrote:
> 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?

I think for a lot of authors the easiest would be easiest if it was in the  
form of multipart/form-data as then they do not have to do anything  
special to get the data on the server.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Tuesday, 20 October 2009 08:38:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:34 GMT