W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: File Upload Status ?

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Tue, 12 Aug 2008 22:23:59 -0700
Message-ID: <c9e12660808122223s37159200pf7875153edbcda3d@mail.gmail.com>
To: "Maciej Stachowiak" <mjs@apple.com>
Cc: "Oliver Hunt" <oliver@apple.com>, "Web Applications Working Group WG" <public-webapps@w3.org>

On Tue, Aug 12, 2008 at 8:01 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>
> On Aug 11, 2008, at 11:21 PM, Garrett Smith wrote:
>

[snip]

>> Why don't you post up your ideas?
>
> We'll probably make a proposal for async reads in time. Our initial
> implementation in WebKit only lets you upload a File object via XHR but we
> believe eventually some form of direct I/O should be added.
>

I have a few questions and an idea.

Does calling send( file ) generate the appropriate Content-Type
request header with matching boundary?

How can this feature be detected?

Idea:
How about passing a form to send? When passing a form to send, the
correct headers are set from the form's enctype, generating the
boundary, content-disposition and other stuff for multipart requests.

The only problem is that it complicates send with much functionality.
Responsibly adaptive and well designed web apps will want to creat
feature tests and fallback strategies, but this will be awkward and
difficult to do, given the current API. Why not create a separate
method - sendForm.

if(xhr.sendForm)
  xhr.sendForm(form);


Garrett

> Regards,
> Maciej
>
>
>
>
Received on Wednesday, 13 August 2008 05:24:34 GMT

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