Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Cordova File writeFile() doesn't work on production

$
0
0

@OliverPrimo wrote:

Hello Everyone,

I am trying to create a PDF file using file (https://ionicframework.com/docs/v3/native/file/) writeFile() function. I am getting a BLOB Data from an API then pass it to the writeFile() function. This works on development mode (ionic cordova run android --device) but when I try it on the production mode (ionic cordova build android --prod --release) it creates the file but whe I try to open it, it returns Invalid file format message.

Here is my code:

     this.file.writeFile(this.filePath, fileName, pdfFile).then(() => {
        //console.log('success');
      });

I don’t know what happened. I hope someone can help me with this. Thank you in advance :blush:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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