Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
3.0.0
-
None
-
browser
Description
When using this cordova-plugin-file-transfer snippet in the browser platform (using Chrome), the cdvfile path that is translated by the plugin, is not accepted by the cordova-plugin-file.
var ft = new FileTransfer(); ft.download( encodeURI('http://some.place/some.file'), 'cdvfile://localhost/persistent/some/path', function (entry) { // do something }, function (error) { // dummy }, false );
The file-transfer plugin rewrites the cdvfile URL to filesystem:http://localhost:8000/persistent/some/path. When this translated path is fed to cordova-plugin-file/www/browser/Preparing.js (the resolveLocalFileSystemURL function) it is not accepted by the 'are there two colons in the path'-check.
So I guess there is something wrong with cordova-plugin-file-transfer accepting the localhost:8000 path, and cordova-plugin-file denying it. Not exactly sure what the fix would be.