HTML 5 filesystem access Type Error

前端 未结 2 492
醉话见心
醉话见心 2021-01-03 02:29

I\'m working on a webapp and I\'m trying to access directories using the filesystem API. I need to request a quota from the user before accessing the directories according t

2条回答
  •  感动是毒
    2021-01-03 02:36

    this version, from https://developers.google.com/chrome/whitepapers/storage seems to at least get further along:

    window.webkitStorageInfo.requestQuota(PERSISTENT, 1024*1024, function(grantedBytes) {
      window.webkitRequestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); 
    }, function(e) {
      console.log('Error', e); 
    });
    

    it's window instead of navigator...

提交回复
热议问题