07-25-2014 04:13 AM
I am trying to access filesystem space, temporary / persistant, and i am able to create folders under the same and create a set of files also.
but when i am trying to access local://temporary/<folder name>/<file name> directly as a link in my html, but i am not able to do that.
any idea what is the problem here? how can i achieve this as accessing the same works in all platforms like Android/IOS and Windows. Why in BB10 this is not working? can u please explain?
Solved! Go to Solution.
07-28-2014 04:26 AM
07-28-2014 01:52 PM
There is no path to persistent or temporary which is consistent between all Cordova platforms. The nativeURL property of the FileEntry will get you the correct path.
Here is an example of downloading an image, saving to persistent storage and then accessing it via an img tag:
You'll need org.apache.cordova.file >= 1.1 and the following in config.xml for the example to work:
<access origin="http://cordova.apache.org" /> <access origin="file:///" />
08-05-2014 02:58 AM
08-05-2014 08:52 AM
08-05-2014 10:07 AM
You'll need to upgrade to WebWorks 126.96.36.199 to use Cordova plugins.
In 188.8.131.52, there is no API call to get persistent/temporary storage path, but you could build it yourself like this:
var persistentPath = blackberry.io.home + '/webviews/webfs/persistent/local__0/', temporaryPath = blackberry.io.home + '/webviews/webfs/temporary/local__0/';