Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple example with window.requestFileSystem() function

I have next problem: I try to use window.requestFileSystem() function in Chrome, but it failed. Look for my steps:

1)I added 'allow file access from file' flag to Chrome(see img bellow):enter image description here

2)I restarted the system.

3)Then I ran the Chrome with 'allow file access file' flag.

4) After all I try to launch this sample code:

function onInitFs(fs) {
  console.log('Opened file system: ' + fs.name);
}

    function errorHandler(e)
{
    console.log("Error");
}    
    window.requestFileSystem(window.TEMPORARY, 5*1024*1024 /*5MB*/, onInitFs, errorHandler);

but It failed: enter image description here

What's wrong in my actions?

like image 953
abilash Avatar asked Oct 05 '12 14:10

abilash


1 Answers

That's because this functionality is currently only availble prefixed, ie window.webkitRequestFileSystem

You may find this turorial interesting: http://www.html5rocks.com/en/tutorials/file/filesystem/

like image 162
ndm Avatar answered Nov 14 '22 22:11

ndm