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

2009/9/14 Michael Nordman <michaeln@google.com>:
> What I think we really want is a script-only means of sending multipart
> form-data encoding POSTs that contain a mix of file- parts and binary-parts
> (in addition to the ability to send the raw contents of a file).
> * script-only, so these POSTs can be performed in workers
> * multipart form-data, its the defacto standard
> The Gears stab at this was BlobBuilder, which let developers compose
> something with a mix of utf8 encoded strings and binary ile data, and
> Gears.HttpRequest.send(blob). Developers were left to their own devices to
> produce a valid mulitpart form-data encoded blob by manually stitching
> together the parts with appropiate boundaries and such, and then setting the
> content-type on the request properly prior to sending. Somewhat tedious for
> developers but it worked.

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.

Once we have that, there's a question of if we need to add convenience
features for specific formats, such as multipart form-data and/or
JSON.

/ Jonas

Received on Monday, 14 September 2009 20:27:14 UTC