当我下载视频时,它以0字节的形式存储在手机内存中,这是我下载视频的代码
$cordovaFileTransfer.download(url, targetPath, {}, true).then(function(result) {
//On successful transfer try and extract the file object
result.file(function (file) {
var localFile = file.localURL;
resolveLocalFileSystemURL(localFile, function (entry) {
var nativePath = entry.toURL();
// Open in another app, will fail if app doesn't exist that can open the mime type
console.log('native path:'+nativePath);
}, function(error) {
//handle error here
console.log('error intro'+error);
});
}, function (error) {
// handle error here
});
}, function (err) {
//handle error here
});