apache / apache/cordova-plugin-file-transfer
Why doesn't it work for me?
- Dominant language
- JavaScript
- Stars
- 606
- Forks
- 874
- PR merge metrics
- No merged PRs in 30d
Description
I did a simple copy and paste:
`var fileTransfer = new FileTransfer();
var uri = encodeURI("https://www.radiomatese.it/Download/RadioMatese.apk");
var fileURL = "cdvfile://localhost/persistent/path/to/downloads/";
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("download error code" + error.code);
},
false, {
headers: {
"Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA=="
}
}
);`
But it doesn't matter what am I wrong?
Contributor guide
Research direction
Start by reproducing the pasted JavaScript FileTransfer download example and capture the error callback's source, target, and code. Compare the requested URI, cdvfile destination, and authorization options with the plugin's documented behavior; done means the failure cause and a specific correction are confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100