FIle downloading in ionic

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

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

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);
});

1 Like

hi ,
I want to download multiple file which will down load one after other like que concept in iOnic 3.
Will you have any solution for that. please help

Hi,

I wrote some time ago an small plugin for progress bar, but this plugin is not ready to work with the fileTransfer plugin, it require some changes for that.

Maybe you can get some ideas from there.

thanks for the reply.
I manage displaying progress bar. But still get stucked for downloading multiple file in queue in ionic 3.
can you help me for that?

Hi,
You can create a Array of Observables, and iterate over there.
I don’t have a example of this right now.