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

On Tue, Nov 10, 2009 at 7:48 AM, Jonas Sicking <jonas@sicking.cc> wrote:

> Yay!
>
> On Tue, Nov 10, 2009 at 4:06 PM, Anne van Kesteren <annevk@opera.com>
> wrote:
> >>>> 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?
>
> I definitely think so yes.
>

Agreed.



>
> Same thing for the send() function.
>
> On a separate note, is sending "application/octet-stream" really
> better than simply sending no Content-Type header at all when sending
> a Blob (or a File with empty mediaType)?
>
>
I think it is probably wise to default to sending a content type that
explicitly says "i don't know the type" on the grounds that being explicit
is better than not.

-Darin

Received on Tuesday, 17 November 2009 18:33:06 UTC