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

I added support for Blob and FormData to XMLHttpRequest Level 2 also based  
on the discussion at the F2F:

   http://dev.w3.org/2006/webapi/XMLHttpRequest-2/

More comments below.


On Tue, 20 Oct 2009 10:28:57 -0700, Darin Fisher <darin@chromium.org>  
wrote:
> Sorry...  I just meant that I need to read up on discussions about
> octet-array support before I can comment ;-)

See the email from Maciej to public-script-coord and es-discuss.


>>> WebKit presently supports sending File.  It does not support FileData  
>>> yet.
>>
>> Is Content-Type set to anything specific if the author has not set it?
>
> // FIXME: Should we set a Content-Type if one is not set.
>
> ^^^ looks like it presently depends on the web page setting the C-T  
> header
> manually :-/  I think that should be fixed to be based on the system's
> knowledge of the file's mime type.

So far I have only added support for Blob (the new FileData) of these two  
and set the Content-Type to application/octet-stream if not provided by  
the Web author. Should I also add File and set the Content-Type to  
File.mediaType?


>> Does it make a straight copy of the file or can modifying the file cause
>> potential problems?
>
> Modifying the file can cause potential problems.  The same is true of
> ordinary HTML form submissions.  I don't think we should spec this  
> behavior.

HTML5 should probably be more explicit about this. I used the  
multipart/form-data algorithm that HTML5 defines. (It mostly defers to  
RFC2388.)


>> After TPAC means the week of November 9. Does that work?
>
> Sure.  We might start on things sooner, but it doesn't mean it can't be
> revised.

Do you have a demo implementation already? :-)


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 10 November 2009 15:07:42 UTC