@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