FileTransfer在Phonegap代码401
问题描述:
嘿,我正在使用Phonegap'FileTransfer。我得到了401代码3错误(未授权)的httprequest。FileTransfer在Phonegap代码401
我实现FT方法:
var ft = new FileTransfer();
ft.download(startUrl + filename, dlPath, function(e){
console.log("Successful download of "+e.fullPath);
renderPicture(e.fullPath);
}, onError);
请求/响应:
07-24 08:58:12.750: D/CordovaLog(3744): {"target":"file:///mnt/sdcard/dk.test.html5Generic/","source":"http://mobilitycms.test.dk:9090/content/picture/menu/showroom","http_status":401,"code":3}
如果你需要测试你需要删除的路径:9090我有上由于IM在内部网络上。
任何帮助,将不胜感激得到这个错误毁:-P
答
问题是,我忘了在我的科尔多瓦XML添加URL作为白名单:
Android: project - res - xml - cordova.xml