Cordova File Transfer (+ ngcordova): downloading 'success' but doesn't download files on Android (maybe on iOS)
<p>I am facing a problem with <strong>Cordova File Transfer</strong>.
I want to download a file, everything seems to work fine, <strong>I have a success, but no file is downloaded at all</strong>. I have spent a entire day trying to figure out what's happening, maybe can you help me ?</p>

<p>Here is my code:</p>

<p><strong>JS</strong>:</p>

<pre><code>...
$scope.downloadFile = function () {

    // File for download
    var url = "http://www.digitallanding.com/wp-content/uploads/2012/12/download-speed-test-630.jpg";

    // Save location
    var targetPath = cordova.file.externalDataDirectory + "TestFile.jpg";

    // Trust every host certificate SSL
    var trustHosts = true;

    // Options to send
    var options = {};

    console.log(cordova.file.externalDataDirectory);
    $cordovaFileTransfer.download(url, targetPath, options, trustHosts)
      .then(function (result) {
          console.log(result);
      }, function (error) {
          console.error(error);
      }, function (progress) {
          // After
          })
      });
}
...
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>...
&lt;ion-list&gt;
        &lt;ion-item ng-click="downloadFile()"&gt;
            &lt;h2 class="icon ion-document"&gt; Test download&lt;/h2&gt;
        &lt;/ion-item&gt;
&lt;/ion-list&gt;
...
</code></pre>

<p>Here is my success log:</p>

<p><a href="https://i.stack.imgur.com/Spuh3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Spuh3.png" alt="Success log"></a></p>

<p>Here is what I have:</p>

<ul>
<li>Whitelist plugin installed, configured (with CSP) and initialized (v1.2.1)</li>
<li>File plugin installed (+ ngcordova lib) and initialized (v4.1.1)</li>
<li>File Transfer plugin installed (+ ngcordova lib) and initialized (v1.5.0)</li>
<li>Cordova 6.0.0</li>
<li>HTC One M8 with Android Marshmallow</li>
</ul>

<p>I tried in config.xml to add:</p>

<pre><code>  &lt;preference name="AndroidPersistentFileLocation" value="Compatibility" /&gt;
  &lt;preference name="AndroidExtraFilesystems" value="sdcard,cache" /&gt;
</code></pre>

<p>Because I thought it was maybe an error of my phone's right, no result.</p>

<p>I also added:</p>

<pre><code>  &lt;allow-navigation href="*" /&gt;
  &lt;allow-intent href="*" /&gt;
  &lt;access origin="*" /&gt;
</code></pre>

<p>To allow the whitelist to not blocking anything, but doesn't change too.</p>

<p>I would really appreciate some help on this success / error.</p>

<p>Thanks,</p>

<p>Pierre</p>