Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Once download, images not display in android gallery?

$
0
0

@Dhb wrote:

Hello there,

I am using $cordovaFileTransfer plugin for image file download, it working fine but after downloaded images not seen in android gallery. i have write below code in my file download controller.

$scope.downloadFile = function(url) {

        var filename = url.split("/").pop();
        var targetPath = cordova.file.externalRootDirectory+'test/'+filename;
        var trustHosts = true
        var options = {};

        $cordovaFileTransfer.download(url, targetPath, options, trustHosts)
          .then(function(result) {
            // Success!
          }, function(error) {
            // Error
          }, function (progress) {
            $timeout(function () {
              $scope.downloadProgress = (progress.loaded / progress.total) * 100;
            })
          });
   }

So, can you please tell me how to display downloaded image in android gallery?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>