You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ian Clelland (JIRA)" <ji...@apache.org> on 2013/10/07 20:21:43 UTC

[jira] [Created] (CB-5007) FileEntry.toURL returns a URL that cannot be used when hosted at a non-file domain

Ian Clelland created CB-5007:
--------------------------------

             Summary: FileEntry.toURL returns a URL that cannot be used when hosted at a non-file domain
                 Key: CB-5007
                 URL: https://issues.apache.org/jira/browse/CB-5007
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin File
    Affects Versions: 3.1.0
            Reporter: Ian Clelland
            Assignee: Ian Clelland
             Fix For: 3.2.0


FileEntry.toURL should return a url which can be accessed by the application. It currently just prepends "{{file:///}}" to the pathname. THe resulting path cannot be read by the application (say, in a script or img tag) if the application is hosted at a custom scheme.

Mobile Chrome Apps, hosted at {{chrome-extension://<app-id>/}}, can't use files they have cached on the local filesystem because of this.

I'd like to change toURL to return something that can be read by any application. http://www.w3.org/TR/file-system-api/#widl-Entry-toURL-DOMString suggests using {{filesystem:///<identifier>}}, which is consistent with Chrome's behaviour.

For older versions of Android, we may have to use content:// urls instead, but I'll investigate that first, to see if it can be consistent.



--
This message was sent by Atlassian JIRA
(v6.1#6144)