I can't seem to get the onprogress
event handler to work when downloading a file. The success callback is triggered and the download goes through successfully, but for some reason, the progress events are not firing. Does anyone see any issues with my code below?
filesystem.root.getFile('/path/to/file', { create: true }, function (file) {
var transfer = new FileTransfer();
transfer.onprogress = function () {
console.log(arguments);
};
transfer.download(
'http://example.com/path/to/file',
file.toURL(),
function () { console.log('success'); },
function () { console.log('error'); },
true
);
}, function () { console.log('error'); });
This app is built using PhoneGap version 3.5.0 and includes the latest file and file-transfer plugins. Testing is being conducted on an iPad running iOS 8.