Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49082

PDF to Base64 using filechooser

$
0
0

Hi everybody:

I saw to other post get the base 64 files, but i didn’t get it work, the other solutions i get no show when the developer is using chooserFile
Other thing, is readAsDataURL, i get not work with file or FileReader.

Can you help me please, thank you

Here is my code:

let res:any = await (await this.file.resolveLocalFilesystemUrl(fileFromPath)).nativeURL;
let filename = String(res).substring(String(res).lastIndexOf('/') + 1);
let url = String(res).substring(0, String(res).lastIndexOf('/'));
const result = await this.file.readAsDataURL(url, filename);
console.log("RESULT: " +  result);

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>