Last active
August 29, 2015 14:26
-
-
Save mayroncachina/325de8a6afff69f1dba6 to your computer and use it in GitHub Desktop.
Phonegap Download API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileTransfer = new FileTransfer(); | |
var uri = encodeURI("http://some.server.com/download.php"); | |
fileTransfer.download( | |
uri, | |
fileURL, | |
function(entry) { | |
console.log("download complete: " + entry.toURL()); | |
}, | |
function(error) { | |
console.log("download error source " + error.source); | |
console.log("download error target " + error.target); | |
console.log("upload error code" + error.code); | |
}, | |
false, | |
{ | |
headers: { | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment