Skip to content

Instantly share code, notes, and snippets.

@coryjthompson
Created November 10, 2012 22:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save coryjthompson/4052684 to your computer and use it in GitHub Desktop.
Save coryjthompson/4052684 to your computer and use it in GitHub Desktop.
FileTransfer Progress with PhoneGap
var fileTransfer = new FileTransfer();
fileTransfer.onprogress = function(result){
var percent = result.loaded / result.total * 100;
percent = Math.round(percent);
console.log('Downloaded: ' + percent + '%');
};
fileTransfer.download(remoteFile, localPath, successCallback, errorCallback);
@rafiqvns
Copy link

rafiqvns commented Jul 5, 2018

thank you. @coryjthompson

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