Trying to create a file using the sandboxed FileSystem API:
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
window.requestFileSystem(
window.PERSISTENT,
1024 * 1024,
function( fs ) {
fs.root.getFile( 'test.txt', {create: true}, function( fe )
{
alert( "OK" );
}, function( e )
{
alert( e.code );
}
);
}, null
);
I always get the error code 10 (QUOTA_EXCEEDED_ERR) on this code.
Chrome: 17.0.963.79 m, started with --allow-file-access-from-files flag.
What am I doing wrong?
For persistent storage, you have to explicitly ask for permission of the user:
You can also choose for temporary storage.