Converting a BlobBuilder to string, in HTML5 Javascript

前端 未结 2 672
执笔经年
执笔经年 2021-01-24 04:42
          function blobToString(blob) {
             var reader = new FileReader();
             var d = \"\";
             reader.onloadend = function() {
                      


        
相关标签:
2条回答
  • 2021-01-24 05:33

    Check out http://blog.ericzhang.com/state-of-binary-in-the-browser/ and his binary.js project.

    0 讨论(0)
  • 2021-01-24 05:41

    it should not be reader.onloadend but rather reader.onloaded

    or try

    reader.onload = function (e) {
    e.target.result -> this is the data. 
    }
    
    0 讨论(0)
提交回复
热议问题