0

Hey I'm using Phonegap' FileTransfer. And I get a 401 code 3 error (unauthorized) httprequest.

My implementation of the FT method:

    var ft = new FileTransfer();
    ft.download(startUrl + filename, dlPath, function(e){
        console.log("Successful download of "+e.fullPath);
        renderPicture(e.fullPath);
    }, onError);

The request/response:

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}

If you need to test the path you need to remove the :9090 I have that on because Im on an internal network.

Any help would be appreciated to get this error destroyed :-P

4

1 に答える 1

2

問題は、コルドバ xml の下に URL をホワイトリストとして追加するのを忘れていたことです。

Android: project - res - xml - cordova.xml
于 2012-07-24T07:21:37.417 に答える