apache / apache/cordova-plugin-file-transfer
Downloaded file got in 0 Bytes
- Dominant language
- JavaScript
- Stars
- 606
- Forks
- 874
- PR merge metrics
- No merged PRs in 30d
Description
Using Ionic 3.20.1 and node 10.16.3
android platform
let uri = 'server url using https';
let dir = this.file.externalRootDirectory+'AppName/Documents/';
this.platform.ready().then(() => {
const fileTransfer: FileTransferObject = this.transfer.create();
fileTransfer.download(uri,dir+'filename.pdf').then((entry: Entry) => {
var fileEntry = entry as FileEntry;
console.log(fileEntry);
}, (error) => {
});
});
My file has been downloaded but got 0 Bytes size
I don't know what happen?
i am using these versions
"@ionic-native/file": "^4.20.0",
"@ionic-native/file-chooser": "^4.18.0",
"@ionic-native/file-opener": "^4.20.0",
"@ionic-native/file-path": "^4.20.0",
"@ionic-native/file-picker": "^4.18.0",
"@ionic-native/file-transfer": "^4.20.0",
Please help
Contributor guide
Research direction
Start with the fileTransfer.download call and its empty error callback, then inspect the Android download behavior for the HTTPS URI and destination path shown in the report. Done means identifying why the resulting PDF is zero bytes and documenting or verifying a fix with a successful non-empty download.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript, nodejs
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100