HTML 5 filesystem access Type Error

前端 未结 2 486
醉话见心
醉话见心 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:44

    I was having the same issues and someone posted the solution, found at filesystem-api-not-working-in-chrome-v27-v29

    navigator.webkitPersistentStorage.requestQuota(1024*1024, 
      function(gB){
      window.requestFileSystem(PERSISTENT, gB, onInitFs, errorHandler);
    }, function(e){
      console.log('Error', e);
    })
    

    You have to remove the PERSISTENT from navigator.webkitPersistentStorage.requestQuota(...)

提交回复
热议问题