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 44E8E200B72 for ; Thu, 11 Aug 2016 14:42:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 43C15160A85; Thu, 11 Aug 2016 12:42:22 +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 88118160A94 for ; Thu, 11 Aug 2016 14:42:21 +0200 (CEST) Received: (qmail 74192 invoked by uid 500); 11 Aug 2016 12:42:20 -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 74071 invoked by uid 99); 11 Aug 2016 12:42:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2016 12:42:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 831AC2C02A3 for ; Thu, 11 Aug 2016 12:42:20 +0000 (UTC) Date: Thu, 11 Aug 2016 12:42:20 +0000 (UTC) From: "Vladimir Kotikov (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-11669) $cordovaFileTransfer.download returns "null" always MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 11 Aug 2016 12:42:22 -0000 [ https://issues.apache.org/jira/browse/CB-11669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Kotikov updated CB-11669: ---------------------------------- Labels: android filetransfer ionic (was: filetransfer ionic) > $cordovaFileTransfer.download returns "null" always > --------------------------------------------------- > > Key: CB-11669 > URL: https://issues.apache.org/jira/browse/CB-11669 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File Transfer > Environment: ionic > Reporter: joanebrown > Labels: android, filetransfer, ionic > > When I use the next code I always get this error: > --- > *ERROR:* > {noformat} > {"code":null,"source":null,"target":null,"http_status":null,"body":null,"exception":null} > {noformat} > *CODE:* > {noformat} > var url = "http://foo.bar/img/image.png"; > var filename = url.split("/").pop(); > var targetPath = cordova.file.externalRootDirectory + 'Pictures/' + filename; > console.log(filename); // returns "image.png" > console.log(targetPath); // returns "file:///storage/emulated/0/Pictures/image.png" > $cordovaFileTransfer.download(url, targetPath, {}, true).then(function (result) { > console.log(JSON.stringify(result)); > $scope.hasil = 'Save file on '+targetPath+' success!'; > $scope.mywallpaper=targetPath; > }, function (error) { > /* return {"code":null,"source":null,"target":null,"http_status":null,"body":null,"exception":null}*/ > console.log(JSON.stringify(error)); > $scope.hasil = 'Error Download file'; > }, function (progress) { > $scope.downloadProgress = (progress.loaded / progress.total) * 100; > }); > {noformat} -- 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