Open rolinger opened 1 year ago
Could you create a pull request to incorporate these to the code, please?
@mramonlopez - well, these two functions work as download alternatives to this plugin. Being that the above functions are dependent on a beta version of file-transfer
I wouldn't want to incorporate changes until we know the direction of file-transfer
and if it will even work with file-downloader
as is. Currently it does not.
It looks like
cordova-plugin-file-transfer
is dead at the moment. That is the key plugin that is required by this plugin. I think the powers that be are working on another, revived version but I can't tell. In the mean time I did find this forked version that does work with Cordova11 (cordova-android@11):https://github.com/ns0m/cordova-plugin-ns0m-file-transfer
- but it doesn't work directly with thisfile-downloader
plugin, so I had to cannibalize the following two (working) functions from others.And this simple function now works (using:
cordova-plugin-ns0m-file-transfer
):I am going to build this out for various things, like a percent counter. And if the above fails for whatever reason, my onError is going to call another backup procedure. The primary differences between these two methods is that the FileTransfer method is slower but can handle much bigger files. The XMLHttpRequest seems a bit faster but also I have read it cannot handle large file transfers well and can timeout on bigger files.
Both functions work.