I am experiencing this issue:
error FileTransferError {code: 3, source: "postfun.com/wp-content/uploads/201...", target: "file:///android_asset/file.jpg", http_status: 401, body: null, …}
Do you have an idea why?
the following is my code:
download() { console.log("download"); let fileTransfer = FileTransfer.create(); const url = "https://www.postfun.com/wp-content/uploads/2019/09/Hickory-horned-devil-82819.jpg"; fileTransfer.download(url, File.applicationDirectory + "file.jpg", true, {mode: 'no-cors'}) .then(async entry => { console.log("download complete: " + entry.toURL()); // need to convert url so you don't get permission errors... this.image = (Capacitor.convertFileSrc(File.tempDirectory + "file.jpg")); }, error => { // handle error console.log("error", error); }) .catch(error => { console.log("ERROR: ", error); }); },
I am also facing this issue, did you find any solution?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am experiencing this issue:
error FileTransferError {code: 3, source: "postfun.com/wp-content/uploads/201...", target: "file:///android_asset/file.jpg", http_status: 401, body: null, …}
Do you have an idea why?
the following is my code:
I am also facing this issue, did you find any solution?