You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/07 08:22:15 UTC

[GitHub] [cordova-plugin-file-transfer] massimilianocom opened a new issue #309: Why doesn't it work for me?

massimilianocom opened a new issue #309:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/309


   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?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] breautek edited a comment on issue #309: Why doesn't it work for me?

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #309:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/309#issuecomment-926259011


   Try using [cordova.file.*](https://github.com/apache/cordova-plugin-file#where-to-store-files) constants instead of the `cdvfile` urls.
   
   Note that the currently released version of this plugin is still an old version that was released before this plugin was [revived](https://lists.apache.org/thread.html/r1a6a11c249b30911eb5ad206f087faee2bb406ee9f854b739dc9a883%40%3Cdev.cordova.apache.org%3E). The development version (in github master branch) contains several fixes that you may need for the plugin to be usable.
   
   There are problems with `cdvfile:` urls on WKWebView on iOS, and now with WebAssetLoader used on cordova-android >= 10. Despite the file transfer documentation still using them in it's examples, `cdvfile` support may be dropped, (iOS schemes and Android's WebAssetLoader kinda makes them obsolete anyway).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] breautek commented on issue #309: Why doesn't it work for me?

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #309:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/309#issuecomment-926259011


   Try using [cordova.file.*](https://github.com/apache/cordova-plugin-file#where-to-store-files) constants instead of the `cdvfile` urls.
   
   Note that the currently released version of this plugin is still an old version that was released before this plugin was [revived](https://lists.apache.org/thread.html/r1a6a11c249b30911eb5ad206f087faee2bb406ee9f854b739dc9a883%40%3Cdev.cordova.apache.org%3E). The development version (in github master branch) contains several fixes that you may need for the plugin to be usable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org