Page 1 of 1

LocalFileSystem

Posted: 22:21, 27 Apr 2015
by theronarmandm
Hi,

I'm Trying to use the functionality window.requestFileSystem and as the first parameter I'm passing in LocalFileSystem.TEMPORARY,
however I keep on getting an error message that LocalFileSystem.PERSISTENT is undefined.

I'm executing the EvoThings clien on an IOS device.


Bellow is a simple piece of sample code to test the function:

app.failCB = function (msg) {
return function () {
alert('[FAIL] ' + msg);
}
};

app.gotFS = function (fs) {
// placeholder success callback
console.log('gotFS');
}



app.test = function()
{

try {
var fail = app.failCB('requestFileSystem');
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, app.gotFS, fail);

} catch(e) {
alert(e);
}
};

Re: LocalFileSystem

Posted: 16:01, 28 Apr 2015
by Fredrik
Looks like this API is not supported on mobile browsers. It is also deprecated. You should look for an alternative storage system. Perhaps "localStorage" would suit you.

http://caniuse.com/#feat=filesystem
http://stackoverflow.com/questions/2263 ... rome-safar

Re: LocalFileSystem

Posted: 17:50, 29 Apr 2015
by theronarmandm
Thanks for the reply ....

Mmmm the LocalFileSystem.PERSISTENT does not work in the Evothings test bench which is undefined, it seems that the test bench ios app does not include the libraries to recognize the variable ,
but it works when I use the Phonegaps live editing desktop and ios app ? ...

but then again as you right fully pointed out it is depricated and should probably not be used at all

Thanks for the reply ... i'll be looking for a different way then to store an image ....

Re: LocalFileSystem

Posted: 10:07, 08 May 2015
by micke
Just want to add for clarity that the Cordova File system plugin is not included in the Evothings Client app. Here is a list of included plugins:

http://evothings.com/doc/studio/api-overview.html

You can build your own Cordova app with the plugins you need and hook it up with Evothings Workbench. Here is info about how to do this:

http://evothings.com/doc/build/cordova- ... rEvothings

Best, Mikael