hi,

i have same issue. here is my patch (for a "This operation is not supported for 
a relative URI"), but whole javascript thing needs to be rewritten.

you must rewrite file platforms/wp8/cordovalib/XHRHelper.cs with this one:

https://gist.github.com/apla/6294961

On 21 Aug 2013, at 18:03, Carlos Santana <csantan...@gmail.com> wrote:

> I started working on root cause, and potential fix.
> 
> There are multiple extra things I found working on this issue:
> 
> 1. Use should not need to specify 'www' or '/www/' or '//www' in the path
> for a relative path like
> User should be able to do this $.get("folder/to/devConfig.txt") assuming
> folder is a the same directory as index.html (Context root)
> What this means is that for other platforms (web, ios, android, etc..)
> specifying 'folder/to/devConfig.txt' works, but for wp8 it doesn't user
> will need to append the 'www/' this breaks the whole thing about coding for
> the web once and run everywhere
> 
> 2. Is user wants to access a file locally and is not relative to or inside
> 'www/' then it needs to use the File Plugin, for example accessing a file
> at the app root same level as 'www' or higher
> 
> 3. We should provide a fix and not be jerks and break old code and try to
> detect if user specifies '//www/folder..' or 'www/folder..' or 'folder/'
> 'file.txt' and still work fine and read the relative file. but maybe
> putting a console log suggesting to users that proper way will be 'folder/'
> or 'file.txt' they should not worry about the name 'www' since it could be
> specified in config.xml
> 
> 4. I'm not familiar on how the response is handle back using
> InvokeScript("__onXHRLocalCallback" it doesn't look unique like a unique
> callback id it looks like a single global for all responses, and might
> cause issues with async calls. I think I will need help on this one from
> wp8 experts and maybe log it under a different jira issue
> https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordovalib/XHRHelper.cs#L222
> 
> --Carlos
> 
> 
> 
> 
> -- 
> Carlos Santana
> <csantan...@gmail.com>

Reply via email to