[whatwg] Asynchronous file upload

Michael Nordman michaeln at google.com
Tue Jun 9 11:37:04 PDT 2009


On Tue, Jun 9, 2009 at 12:48 AM, Anne van Kesteren <annevk at opera.com> wrote:

> On Tue, 09 Jun 2009 03:33:56 +0200, Ian Hickson <ian at hixie.ch> wrote:
> > On Mon, 11 May 2009, Samuel Santos wrote:
> >> I was asked by a client if it was possible to implement something
> >> similar to the asynchronous file upload used on gmail using only
> >> standard web technologies.
> >>
> >> Looking at the gmail source code I can see that they use some flash
> >> magic. And by reading the HTML5 spec I could not find a way to implement
> >> this feature.
> >
> > This is a feature of XHR2, I believe:
> >
> >    http://dev.w3.org/2006/webapi/XMLHttpRequest-2/
> >
> > ...though it will probably rely on the upcoming File API to actually
> > obtain files to upload.
>
> And as such is not defined yet at all, but that is pretty much the plan,
> yes.


Does the planned API allow for the composition of multipart encoded posts
including binary file parts? So not just sending the binary file data in
isolation.

Such that the caller can use some File API to obtain references to files,
and then stitch together a "blob" of data to upload, including the file
data, that looks just like what would be sent via a Form post, and then to
have XHR2 send it.

Fyi, the latest release of Gears lets you do that with the combination of
Desktop.openFiles(), BlobBuilder, and HttpRequest.send(blob)... of course
non-standard.


>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090609/5db43a54/attachment-0001.htm>


More information about the whatwg mailing list