Convert blob to base64

后端 未结 9 2107
无人共我
无人共我 2020-11-22 13:12

This is a snippet for the code that I want to do Blob to Base64 string:

This commented part works and that when the URL generated by this i

9条回答
  •  独厮守ぢ
    2020-11-22 13:25

    you can fix problem by:

    var canvas = $('#canvas'); 
    var b64Text = canvas.toDataURL();
    b64Text = b64Text.replace('data:image/png;base64,','');
    var base64Data = b64Text;
    

    I hope this help you

提交回复
热议问题