Search This Blog

Saturday 20 February 2016

download files using ionic/cordova

to download files using cordova, install filetransfer plugin

>ionic plugin add cordova-plugin-file-transfer

var fileTransfer = new FileTransfer();
fileTransfer.download(FileURL,StoragePath,function(storedurl){ //code goes here});

FileURL - path from which you need to download the file
StoragePath - storage location after download
function(storedurl) - function call back after downloaded & stored

No comments:

Post a Comment