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

File writeFile don't save Blob on some Android

$
0
0

@MiriK wrote:

Hi guys,

I have a problem with saving blob to my android device via cordova-plugin-file writeFile method. There is no problem in iOS and some Android devices.

async downloadLogbook(vehicle) {
    try {
      const data = await this.logbookProvider.getLogbookPdf(vehicle.id).toPromise()
      const blob = new Blob([data._body], { type: 'application/pdf' })
      const filename = 'logbook.pdf'
      const opt: IWriteOptions = { replace: true }

      await this.file.writeFile(this.file.dataDirectory, filename, blob, opt)
    } catch (err) {
      this.actionCtrl.showError(err)
    }

method writeFile is not returning anything. No err, no Success

Any idea?
Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



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