Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18B1610AF1 for ; Fri, 28 Feb 2014 15:50:23 +0000 (UTC) Received: (qmail 17956 invoked by uid 500); 28 Feb 2014 15:50:22 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 17880 invoked by uid 500); 28 Feb 2014 15:50:20 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 17851 invoked by uid 99); 28 Feb 2014 15:50:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 15:50:19 +0000 Date: Fri, 28 Feb 2014 15:50:19 +0000 (UTC) From: "Ian Clelland (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6117) cdvfile file url is not working with html5 image src MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915906#comment-13915906 ] Ian Clelland commented on CB-6117: ---------------------------------- Hi [~ritasakhuja], The only difference for Android < 4.0 is that I use {{.toNativeURL()}} in place of {{.toURL()}} right now. The code would look like this: {code} var filename = "feather.gif"; var imageURL = "http://apache.org/images/feather-small.gif"; requestFileSystem(TEMPORARY, 0, function(fileSystem) { var ft = new FileTransfer(); ft.download(imageURL, fileSystem.root.toURL() + "/" + filename, function(entry) { var imgElement = new Image(); imgElement.src = entry.toNativeURL(); document.getElementById("output").appendChild(imgElement); }); }); {code} For your last issue, I believe that the problem is that the File plugin is not configure to initialize itself when your application starts. This is an issue with the current version of the plugin, but is fixed in the development version. (The JIRA issue is CB-6087). That version should be released as v1.0.1 very soon, and will also include the {{.toNativeURL}} method. > cdvfile file url is not working with html5 image src > ---------------------------------------------------- > > Key: CB-6117 > URL: https://issues.apache.org/jira/browse/CB-6117 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File, Plugin File Transfer > Affects Versions: 3.4.0 > Reporter: rita > Priority: Critical > > Hi > I had used the fileTranser APi to download the image from a given path. > The image was downloaded at the path cdvfile://localhost/persistent/SPB/ics-android.png. > But I am unable to access this image as url for tag in html.Same code was working till 2.9.0 -- This message was sent by Atlassian JIRA (v6.1.5#6160)