You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joonas Trussmann (JIRA)" <ji...@apache.org> on 2017/12/04 12:38:00 UTC

[jira] [Created] (CB-13631) Can't read files from cordova.file.applicationDirectory on cordowa-browser platform

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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org