Converting screenshot URI to base64


#1

How to convert URI from screenshot native plugin into base64?

  this.screenshot.URI(100).then((result) => {
    convertToBase64(result);
    }, (err) => {
    console.log(err);
      });

#2

I am assuming you want to get the file as a base64 and not the path to the file, right? Also, may I ask why you want this as a base64? :slight_smile:


#3

Yes, image of course, restful api I am working with is expecting image to be passed as a base64.


#4

Hmmm check out the file plugin, maybe you can load the file and btoa() it, not sure though.

On mobile so I’m too lazy to provide links :stuck_out_tongue: If you need them I’ll link it tomorrow