Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229727

IonicNative File writeExistingFile not working?

$
0
0

in the succes response you have nativeUrl parameter this is the file location the you can use with the nativeUrl and FileOpener plugin to open this file
Example:

this.file.writeFile(cordova.file.externalDataDirectory,"Test.pdf","Hello World",true).then(succ=>{
    console.log("File write success : ", succ)

    this.fileOpener.open(
      succ.nativeURL,
      'application/pdf'//file mimeType
    ).then((success) => {
      console.log('success open file: ', success);
    }, (err) => {
      console.log('error open file', err);
    });
},
err=>{
  console.log(" write File error : ", err)
});

Viewing all articles
Browse latest Browse all 229727

Trending Articles



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