Reputation: 41
Is it possible to download and store files (accessing the file system) with Capacitor? I've only been able to find Cordova plugins, but would like to keep the app pure using Ionic and Capacitor.
Upvotes: 0
Views: 2554
Reputation: 50
You can use Filesystem plugin for Capacitor to handel file-system and you can write your file inside directory You can find reference for plugin here.
downloadFile(options: DownloadFileOptions) => Promise<DownloadFileResult>
Upvotes: 0
Reputation: 100
You should simply use download() method like this:
this.pdfObj.download();
Here you can find more info: https://forum.ionicframework.com/t/do-you-know-how-to-save-and-open-a-pdf-using-capacitor-and-ionic-4/158634/3
Upvotes: 0