Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 77ED32009F4 for ; Thu, 26 May 2016 09:18:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 76896160939; Thu, 26 May 2016 07:18:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BE269160A10 for ; Thu, 26 May 2016 09:18:15 +0200 (CEST) Received: (qmail 14744 invoked by uid 500); 26 May 2016 07:18:14 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 14727 invoked by uid 99); 26 May 2016 07:18:14 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2016 07:18:14 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id ED56B2C1F60 for ; Thu, 26 May 2016 07:18:13 +0000 (UTC) Date: Thu, 26 May 2016 07:18:13 +0000 (UTC) From: "Sergey Shakhnazarov (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-11305) use cdvfile: cannot import image or js MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 26 May 2016 07:18:16 -0000 [ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301661#comment-15301661 ] Sergey Shakhnazarov commented on CB-11305: ------------------------------------------ The gist is that you can get the file entry using {{cordova.file.applicationDirectory}} + {{getDirectory}}/{{getFile}} and then [read its contents|https://github.com/apache/cordova-plugin-file-transfer#download-a-binary-file-to-the-application-cache-] or use it {{cdvfile}} or native URL with {{fileEntry.toInternalURL()}} or {{fileEntry.toURL()}} correspondingly. The given example with {{toInternalURL()}} will work after applying your patch. > use cdvfile: cannot import image or js > -------------------------------------- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File > Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 > Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it doesn't work. I haven't seen anything about using with assets, but window.resolveLocalFileSystemURL can handle it to native URL file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org