Does HTML 5's BlobBuilder() still work in Google Chrome?

20,720

It's gone or deprecated. Use the new Blob constructor.

Read: http://updates.html5rocks.com/2012/06/Don-t-Build-Blobs-Construct-Them

In your tutorial instead of:

var bb = new (window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder)();
bb.append(data);
var blob = bb.getBlob();

Do:

var blob = new Blob([data]);
Share:
20,720
user2011958
Author by

user2011958

Updated on June 17, 2020

Comments

  • user2011958
    user2011958 almost 4 years

    Based in this article http://cloudevils.wordpress.com/2012/10/18/ajax-file-upload-without-post-using-html5/ I created a form to upload files. Initially works fine in chrome but now is not workin more. In FF work fine. I made some debugs and this line

    var bb = new (window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder)();
    

    seems stop working in chrome. Browsering around I find some info about BlobBuilder() function that is not supported more in chrome.

    Can help me?

  • Adam
    Adam over 11 years
    @user2011958 try new Blob([data])
  • shuji
    shuji over 10 years
    looks like getBlob is also deprecated, you have to pass the object directly.