W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2010

Re: FormData and BlobBuilder - duplication of functionality?

From: Kinuko Yasuda <kinuko@chromium.org>
Date: Thu, 15 Apr 2010 17:20:12 -0700
Message-ID: <j2jf6ddb9231004151720v9303dcbqcee7ee0b8590b858@mail.gmail.com>
To: Michael Nordman <michaeln@google.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Dmitry Titov <dimich@google.com>, Web Applications Working Group WG <public-webapps@w3.org>, Eric Uhrhane <ericu@google.com>
> > [Constructor] interface FormData { Blob toBlob (); void append(DOMString
>> > name, Blob value); void append(DOMString name, DOMString value); };
>> > Also it looks like BlobBuilder (in the draft dimich linked to) is
>> lacking a
>> > means for the caller to set the type attribute of the blob being built.
>> > A couple ways that could be provided...
>> > [Constructor] interface BlobBuilder { attribute DOMString endings;
>> > attribute DOMString type; // option a
>> > Blob getBlob (in DOMString type); // option b void append (in DOMString
>> > text) raises (FileException); void append (in Blob data); };
>> I don't feel strongly, but "option b" looks cleaner to me. Might want
>> to make the argument optional though, and default to the empty string.
> Option b works for me and agreed it should be optional with empty being the
> default value.

I prefer option b as well.  (Especially if there'll be a use case where
users want to change the 'type' each time they call getBlob())

What will be the default type of Blob when it's not specified?

In this generally agreed proposal, if we append a blob made by FormData to
another FormData, we will be getting a nested multipart data, right?

Received on Friday, 16 April 2010 00:21:52 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:24 UTC