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

FormData and BlobBuilder - duplication of functionality?

From: Dmitry Titov <dimich@google.com>
Date: Tue, 13 Apr 2010 17:11:29 -0700
Message-ID: <y2i28040fc61004131711w14957ae4yc2164fe40f40e794@mail.gmail.com>
To: Web Applications Working Group WG <public-webapps@w3.org>

It seems we are currently implementing 2 very similar objects -
 and BlobBuilder <http://www.w3.org/TR/file-writer-api/#idl-def-BlobBuilder>.
Both can be created, then strings or Blobs can be appended, then it can be
sent via XHR or saved into a file (well, FormData can not be saved in the
file yet). But, they are very similar:

var bb = new BlobBuilder();
bb.appendText("Lorem ipsum");

var fd = new FormData();
fd.appendText("data1", "Lorem ipsum");
fd.appendBlob("data2", someBlob);

Are those two similar enough to justify merging them into a single object
(defined as a a list of named BlobItems) that could be used for both?

One difference is that BlobBuilder does not use a mime wrapper around data
pieces, but rather concatenates them - there could be a property for that.

Received on Wednesday, 14 April 2010 00:11:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:06 UTC