W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [XHR2] Blobs, names and FormData

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 23 Aug 2011 01:16:24 -0700
Message-ID: <CA+c2ei-zPbi31H=kaPd5B4vQp3J8EaK29=ynFFobBuei_T_MPQ@mail.gmail.com>
To: Alfonso Martínez de Lizarrondo <amla70@gmail.com>
Cc: Anne van Kesteren <annevk@opera.com>, Charles Pritchard <chuck@jumis.com>, Adrian Bateman <adrianba@microsoft.com>, Julian Reschke <julian.reschke@gmx.de>, Webapps WG <public-webapps@w3.org>, Michael Nordman <michaeln@google.com>
2011/8/23 Alfonso Martínez de Lizarrondo <amla70@gmail.com>:
> Julian Reschke also wanted to specify the mime type

Why? Keeping in mind that you can (and arguably should) already
specify the mimetype when you create a blob. Both BlobBuilder.getBlob
and Blob.slice lets you specify a mimetype. And when you get a Blob
from XHR or <canvas> it should already have the correct mimetype.

Additionally you can always create a new blob with whatever mimetype
you want by doing:

bb = new BlobBuilder;
bb.append(myblob);
blobwithnewmimetype = bb.getBlob(somemimetype);

Or if we make BlobBuilder.append return the BuilbBuilder it'll just be

blobwithnewmimetype = (new BlobBuilder).append(myblob).getBlob(somemimetype);

/ Jonas
Received on Tuesday, 23 August 2011 08:17:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT