PhoneGap fileTransfer.download不支持相对URI

时间:2014-11-07 11:01:56

标签: android cordova phonegap-plugins file-transfer

在我的应用程序phonegap android中,当我想从serveur下载文件到我的设备时,显示异常:java.lang.IllegalArgumentException:此函数不支持相对URI:

download = function ()
    {   
    var fileTransfer = new FileTransfer();
    fileTransfer.download(path,currPath, win_download,fail_download);
    }   

path =接收文件的服务器的URL

currPath =设备上文件的完整路径

成功

function win_download(entry) {
   console.log("download complete: " + entry.fullPath);
    }   

失败:

function fail_download(error) {
        alert("download error source ");
        console.log("download error source " + error.source);
        console.log("download error target " + error.target);
        console.log("upload error code" + error.code);
    } 

我在模拟器BlueStacks上测试

0 个答案:

没有答案