See http://code.google.com/p/gears/source/browse/trunk/gears/blob/blob_builder_module.h for the c++ source code
http://code.google.com/p/gears/source/browse/trunk/gears/test/testcases/blob_tests.js for javascript test code that calls it <http://code.google.com/p/gears/source/browse/trunk/gears/blob/blob_builder_module.h> On Mon, Jun 15, 2009 at 2:43 AM, Christian Stocker <[email protected]> wrote: > > Hi > > On Apr 27, 8:50 pm, Michael Nordman <[email protected]> wrote: > > A new scriptable interface in Gears 0.5.16.0 could help here. > > > > // creates a new emptyblobBuilder > > var builder = google.gears.factory.create('beta.blobbuilder'); > > > > interfaceBlobBuilder{ > > append(String str); // appends the string data, utf8 encoded > > append(Blob blob); // appends the blob verbatim > > Blob getAsBlob(); // returns a blob containing all data appended to > > the builder since construction > > > > }; > > > > By using ablobBuilder, you can compose a multipart/form-data encoded > > blob that can be uploaded via HttpRequest.send. > > I tried looking at the actual source of Gears (from SVN) and couldn't > find anything, which would make that easily possible. Did I miss > something? > > This announcement: > > * Blob builder API, which allows script to build binary blobs, > including valid multi-part-form-encoded blobs that contain binary file > parts, which can then be uploaded using Gears.HttpRequest > > made me especially eager to try it, but I didn't succeed. > > thanks for any hints > > christian > > > > > >
