These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:05 pm Advanced search

Converting a BlobBuilder to string, in HTML5 Javascript

If you are stuck or have questions regarding HTML or other Web technologies, ask your questions here. No question too dumb!

Converting a BlobBuilder to string, in HTML5 Javascript

Postby rich_m » Sun Jul 31, 2011 7:25 pm

Code: Select all
function blobToString(blob) {
             var reader = new FileReader();
             var d = "";
             reader.onloadend = function() {
                 d.callback(reader.result);
                  console.log(reader.result);
             };
             reader.readAsText(blob);
               return d;
         };


The above code does not work, but I guess my intentions are clear, I want to convert some binary data(WebKitBlobBuilder) to a string. Also the "console.log(reader.result);" doesn't display anything.
rich_m
<h6>
 
Posts: 4
Joined: Fri Jun 17, 2011 9:28 am

Return to Help & Advice

Who is online

Users browsing this forum: No registered users and 0 guests