ebidel / idb.filesystem.js

HTML5 Filesystem API polyfill using IndexedDB
https://www.npmjs.com/package/idb.filesystem.js
Other
487 stars 46 forks source link

file is not being saved. #52

Open carper7 opened 3 years ago

carper7 commented 3 years ago

Hi,

I am using your plugin on chrome in android tablet but when I run the code it does not create the file. This is my code:

window.webkitRequestFileSystem(PERSISTENT, 1024 * 1024, function(fs) { console.log('Opened ' + fs.name);

fs.root.getFile('NewFile.txt', {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { fileWriter.onwritestart = function() { console.log('WRITE START');

  };

  fileWriter.onwriteend = function() {
    console.log('WRITE END');
  };

  var blob = new Blob(['1234567890'], {type: 'text/plain'});

  fileWriter.write(blob);
}, onError);

}, onError); }, onError);

function onError(e) { console.log('Error', e); }

No errors are reported and to me is an indication nothing is wrong but still it does not do anything.

Thank you.