|
请问下我的图片下载下来后为什么在手机相册里面看不到? 代码如下。请大神指点。。。
$ionicPlatform.ready(function(){
options = {};
url = "http://view.ionic.io/phones.png";
var targetPath = cordova.file.dataDirectory + "a.jpg";
var trustHosts = true;
$cordovaFileTransfer.download(url, targetPath, options, trustHosts)
.then(function(entry) {
value = angular.toJson(entry.nativeURL);
$scope.imgFile = entry.toURL();
alert($scope.imgFile);
$scope.i2 = entry.toInternalURL();
alert($scope.i2);
}, function(err) {
// Error
alert("error");
}, function (progress) {
$timeout(function () {
$scope.downloadProgress = (progress.loaded / progress.total) * 100;
})
});
});
|
|