Joonas Trussmann created CB-13631:
-------------------------------------
Summary: Can't read files from cordova.file.applicationDirectory
on cordowa-browser platform
Key: CB-13631
URL: https://issues.apache.org/jira/browse/CB-13631
Project: Apache Cordova
Issue Type: Bug
Components: cordova-plugin-file
Reporter: Joonas Trussmann
I'm attempting to copy files from my cordova.file.applicationDirectory to my
cordova.file.dataDirectory on the cordova-browser platform with
cordova-plugin-file. resolveLocalFileSystemURL fails (with error code 5)
because applicationDirectory is at http://localhost:8000/ URL.
The implementation of resolveLocalFileSystemURL in src/browser/FileProxy.js
accounts for this by having a rule for lookups from applicationDirectory to be
fetched via a GET request.
The implementations in www/resolveLocalFileSystemURI.js and
www/browser/Preparing.js do not handle this case. In most browsers the second
is actually called, in Chrome it's the latter. I've yet to see the first
implantation (FileProxy.js) get called.
I'd love to fix this myself and submit a PR on github, but I'm having a bit of
trouble understanding the reasoning between 3 different implementations, of
which the most feature complete is never actually called.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]