0

I need to know how can do to know the address path from the file when you save the image in de device with the instructions that there are in this guide:

Phonegap Plugin:How to convert Base64 String to a PNG image in Android

Please...I need help!!

Community
  • 1
  • 1

2 Answers2

1
window.requestFileSystem  = window.requestFileSystem || window.webkitRequestFileSystem;
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
function gotFS(fileSystem) {
   console.log("got filesystem"); 
   console.log(fileSystem.root.fullPath);   
}
function fail() {
   console.log("failed to get filesystem");
}
Ved
  • 2,701
  • 2
  • 22
  • 30
0

Im using this code

 function test2(myOtherBase64){

                //Shows how to use optional parameters
                window.plugins.base64ToPNG.saveImage(myOtherBase64, {filename:"dot.png", overwrite: true}, 
                   function(result) {
                      alert(result);

                      //uploadFile2(filename.path);
                   }, function(error) {
                      alert(error);
                });
                window.requestFileSystem  = window.requestFileSystem || window.webkitRequestFileSystem;
                window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
                function gotFS(fileSystem) {
                   console.log("got filesystem"); 
                   console.log(fileSystem.root.fullPath);  
                   alert(fileSystem.root.fullPath); 
                }
                function fail() {
                   console.log("failed to get filesystem");
                }

             }

But the response with this code is:

file:///mnt/sdcard

I need something more...because I need the all the route for the file that I saved because after I have to send to File Transfer to upload the file to the server!!