Relative URIs not supported - with an absolute URI


i'm trying achieve alone these lines, downloading file.

 

new filetransfer().download(   downloadpath,    "cdvfile://localhost/temporary/test/",    (entry) => {   console.log("done downloading " + entry.tourl());    },    true, // trustallhosts    {headers: {}} ); 

 

testing done on android using newest version of cordova, file plugin , file transfer plugin.

 

the error (which assume because of file path "cdvfile://localhost.../") follows

 

e/pluginmanager( 7657): uncaught exception plugin

e/pluginmanager( 7657): java.lang.illegalargumentexception: relative uris not supported.

    e/pluginmanager( 7657):     @ org.apache.cordova.cordovaresourceapi.assertnonrelative(cordovaresourceapi.java:452)

e/pluginmanager( 7657):     @ org.apache.cordova.cordovaresourceapi.remapuri(cordovaresourceapi.java:135)

e/pluginmanager( 7657):     @ org.apache.cordova.filetransfer.filetransfer.download(filetransfer.java:743)

e/pluginmanager( 7657):     @ org.apache.cordova.filetransfer.filetransfer.execute(filetransfer.java:185)

e/pluginmanager( 7657):     @ org.apache.cordova.cordovaplugin.execute(cordovaplugin.java:98)

e/pluginmanager( 7657):     @ org.apache.cordova.pluginmanager.exec(pluginmanager.java:133)

e/pluginmanager( 7657):     @ org.apache.cordova.cordovabridge.jsexec(cordovabridge.java:59)

e/pluginmanager( 7657):     @ org.crosswalk.engine.xwalkexposedjsapi.exec(xwalkexposedjsapi.java:40)

e/pluginmanager( 7657):     @ org.chromium.base.systemmessagehandler.nativedorunlooponce(native method)

e/pluginmanager( 7657):     @ org.chromium.base.systemmessagehandler.handlemessage(systemmessagehandler.java:37)

e/pluginmanager( 7657):     @ android.os.handler.dispatchmessage(handler.java:102)

e/pluginmanager( 7657):     @ android.os.looper.loop(looper.java:135)

e/pluginmanager( 7657):     @ android.os.handlerthread.run(handlerthread.java:61)

 

(from adb logcat)

 

i can't make sense out of because until believed, uri target directory i'm using, in fact absolute one. also, docs suggest using function did.

 

thanks advice.

what version of android testing on?

 

also, `downloadpath` like?



More discussions in PhoneGap


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop