[
https://issues.apache.org/jira/browse/CB-6201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938255#comment-13938255
]
Ian Clelland commented on CB-6201:
----------------------------------
Thanks for clarifying.
You've come across one of the biggest changes in the File plugin since last
year: {{.fullPath}} was never intended to be the way to get a URL, and
especially not one usable by an <img> tag. It's supposed to be the relative
path from the filesystem root (the root of the temporary or persistent
filesystem areas, that is -- not the root of the actual device). It's really
only good for using as an argument to methods like
{{filesystem.root.getFile()}}. For other uses, you need to get a URL that the
webview can process.
There are two methods on the FileEntry object that you can use to get such a
URL: {{entry.toURL()}} will return a URL starting with {{cdvfile://}}. which
will always be handled by the File plugin. It can be used as an <img> src
attribute on iOS and on Android >=4.0.
Since v1.0.1, you can also use {{entry.toNativeURL()}} to get an actual
{{file://}} or {{content://}} URL, which can be used as an img src on all
platforms (and also as a video or audio source, for those media types). The
JIRA issue for <img> tags is CB-6117.
I believe that you'll either need to update your code to use {{entry.toURL}} or
{{toNativeURL}}, or continue using the previous version of the File plugin
(0.2.5), if you can't update the code, and need the old behaviour.
> Invalid full path and URI returned from fileEntry.moveTo and fileEntry.copyTo
> ------------------------------------------------------------------------------
>
> Key: CB-6201
> URL: https://issues.apache.org/jira/browse/CB-6201
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File
> Affects Versions: 1.1.0
> Environment: I'm building Android and iOS with build.phonegap.com
> version 3.10. This issue is occuring on both Android and iOS.
> Reporter: brian johnston
> Assignee: Ian Clelland
> Attachments: copyToMoveToCode.txt
>
>
> fileEntry.fullPath does not return the full path in version 1.1.0. However,
> version 1.0.0 of the file plugin does return the full path. This issue
> occurs on both iOS and Android.
--
This message was sent by Atlassian JIRA
(v6.2#6252)