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
>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