How to write UTF-8 or Base64 data into a file (jpg/doc/pdf) on local storage(sdcard) in Phonegap

后端 未结 3 2124
渐次进展
渐次进展 2021-02-09 07:14

I am getting byte array like var byteArr=[12,-123,43,99, ...] from API, Then I am converting it into UTF-8 String by

     var utf8_str = String.fromCharCode.appl         


        
3条回答
  •  不要未来只要你来
    2021-02-09 07:55

    I had issues on another project with btoa not doing a proper conversion, so I ended up using Base64 binary in my project to decode the Base64 response.

    What I noticed was that the file I transferred was bigger when saved on the phone compared to the file residing on the server.

    Maybe that is the case for you as well?

提交回复
热议问题