You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/04/04 19:12:15 UTC

[jira] [Commented] (CB-6393) Make {File|Directory}Entry.toURL() return something useful for developers

    [ https://issues.apache.org/jira/browse/CB-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13960138#comment-13960138 ] 

ASF subversion and git services commented on CB-6393:
-----------------------------------------------------

Commit 37bedcb0543bfc4f37517af32120b6ab9743315a in cordova-plugin-file's branch refs/heads/dev from [~iclelland]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file.git;h=37bedcb ]

CB-6393: Change behaviour of toURL and toNativeURL

Change Entry.toURL to return webview-usable URLs where possible.
Soft-deprecate Entry.toNativeURL
Introduce Entry.toInternalURL, for internal use for bridge-formatting Entry objects


> Make {File|Directory}Entry.toURL() return something useful for developers
> -------------------------------------------------------------------------
>
>                 Key: CB-6393
>                 URL: https://issues.apache.org/jira/browse/CB-6393
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin File
>            Reporter: Ian Clelland
>            Assignee: Ian Clelland
>
> [Relevant mailing list thread|http://markmail.org/thread/iarsjqjynd7kpcyk]
> {{FileEntry.toURL()}} and {{DirectoryEntry.toURL()}} should return, by default, URLs which are usable by the webview, as {{src}} for video, audio and image tags.
> Practically, this means that {{.toURL()}} should return the same values as {{.toNativeURL()}} currently does: a file URL if possible; a content (Android) or assets-library (iOS) library if that's required, or a cdvfile URL as a last resort.
> {{.toNativeURL}} should stick around for a while (with a deprecation notice) since it's been released, and I've advocated its use on various forums. It should have exactly the same semantics as {{.toURL}} though.
> We can introduce a {{.toInternalURL}} method to format cdvfile URLs for passing over the bridge, since that is the format that the native side of the file plugin expects, and it would be nice to have a single place where that conversion is done.



--
This message was sent by Atlassian JIRA
(v6.2#6252)