From issues-return-22616-apmail-cordova-issues-archive=cordova.apache.org@cordova.apache.org Mon Mar 17 15:29:45 2014 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 EB58CC9C7 for ; Mon, 17 Mar 2014 15:29:44 +0000 (UTC) Received: (qmail 10946 invoked by uid 500); 17 Mar 2014 15:29:44 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 10921 invoked by uid 500); 17 Mar 2014 15:29:43 -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 10909 invoked by uid 99); 17 Mar 2014 15:29:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 15:29:42 +0000 Date: Mon, 17 Mar 2014 15:29:42 +0000 (UTC) From: "Ian Clelland (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6146) FileTransfer.upload does not support iOS asset library type of URL 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-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937919#comment-13937919 ] Ian Clelland commented on CB-6146: ---------------------------------- [~farhadf], have you been able to verify this on the new version of File? > FileTransfer.upload does not support iOS asset library type of URL > ------------------------------------------------------------------ > > Key: CB-6146 > URL: https://issues.apache.org/jira/browse/CB-6146 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 3.3.0 > Environment: Macbook Air, 10.9 > Reporter: Farhad Farzaneh > Assignee: Ian Clelland > > When picking an image from the camera roll and using a NATIVE_URL type, the url may be something like: {{assets-library://asset/asset.PNG?id=CFDB9708-75A2-44A9-9092-FCE1DB471B30&ext=PNG}}. When this is presented as the localURL to {{[CDVFileTransfer fileDataForUploadCommand:]}} it recognizes the file system to be the asset library and tries to read the file from the indicated URL using {{[CDVAssetLibraryFilesystem readFileAtURL:]}}. I'm not sure why this method tries to pull back the path from the URL with > {code} > NSString *path = [self fileSystemPathForURL:localURL]; > {code} > and then rebuild the URL from that path below (line 223). However, the returned path is {{@"/asset.PNG"}}, which when used to retrieve the asset fails. > If the line (CDVAssetLibraryFilesystem.m: 223) > {code} > [assetsLibrary assetForURL:[NSURL URLWithString:path] resultBlock:resultBlock failureBlock:failureBlock]; > {code} > is changed for > {code} > [assetsLibrary assetForURL:localURL.url resultBlock:resultBlock failureBlock:failureBlock]; > {code} > then the asset can be found. But of course this was done for a reason, so I imagine my fix breaks something else... > -- This message was sent by Atlassian JIRA (v6.2#6252)