Skip to content

Instantly share code, notes, and snippets.

@macdonst
Created December 22, 2011 18:30
Show Gist options
  • Save macdonst/1511318 to your computer and use it in GitHub Desktop.
Save macdonst/1511318 to your computer and use it in GitHub Desktop.
FileTransfer Download Example
var fileTransfer = new FileTransfer();
fileTransfer.download(
"http://developer.android.com/assets/images/home/ics-android.png",
"/sdcard/ics.png",
function(entry) {
console.log("download complete: " + entry.fullPath);
},
function(error) {
console.log("download error source " + error.source);
console.log("download error target " + error.target);
console.log("upload error code" + error.code);
}
);
@nahwinrajan
Copy link

can you show me on how to download files and save it to application directory on external storage ?
Trying to firgure this out yet can't find the solution.

need to stoare the app files on external storage and need to make sure those files are cleaned up when the app is uninstalled.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment