Re: [XHR2] Blobs, names and FormData

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 UTC