LocalFileSystem

Ask, and ye shall receive.
theronarmandm
Posts: 2
Joined: 22:04, 27 Apr 2015

LocalFileSystem

Postby theronarmandm » 22:21, 27 Apr 2015

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);
}
};

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: LocalFileSystem

Postby Fredrik » 16:01, 28 Apr 2015

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

theronarmandm
Posts: 2
Joined: 22:04, 27 Apr 2015

Re: LocalFileSystem

Postby theronarmandm » 17:50, 29 Apr 2015

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 ....

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: LocalFileSystem

Postby micke » 10:07, 08 May 2015

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


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 43 guests