FIle downloading in ionic


#1

I’ve been looking for a plugin or any tutorial on how to download a file and get progress while downloading .I’ve found this https://github.com/dsgriffin/Ionic-2-File-Transfer-Example but it doesn’t have any download progress option . if someone can help me with this it would be greate

Looking for a reply soon
Thanks


#2

hey did you find any solution, i am facing same issue.


#3

Well it has a onProgress(listener) as shown in the documentation.

const fileTransfer: TransferObject = this.transfer.create();
fileTransfer.download(URL_TO_SERVER, this.file.dataDirectory + 'file.pdf')

fileTransfer.onProgress((data)=>{
    console.log(data);
});