How to parse into base64 string the binary image from response?

后端 未结 6 1194
广开言路
广开言路 2020-11-30 02:49

I want to parse the requested image from my REST API into base64 string.

\"enter

6条回答
  •  天命终不由人
    2020-11-30 03:20

    The issue you're encountering is that the response is being considered a Unicode String. See the section on Unicode Strings here: window.btoa

    Several solutions are offered in this post

提交回复
热议问题