Harm van Tilborg created CB-10312:
-------------------------------------
Summary: [browser] Through plugin-file-transfer translated
cdvfile:// URL not accepted by plugin-file
Key: CB-10312
URL: https://issues.apache.org/jira/browse/CB-10312
Project: Apache Cordova
Issue Type: Bug
Components: Plugin File, Plugin File Transfer
Affects Versions: 3.0.0
Environment: browser
Reporter: Harm van Tilborg
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.
{code:javascript}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
);
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]