无法在存储中创建文件夹Chrome

问题描述:

我正在尝试构建仅需要在Chrome浏览器中工作的应用程序。 其中的一部分是可以使用拖动功能上传文件夹。无法在存储中创建文件夹Chrome

我现在面临的问题是,我甚至不能创建一个临时文件夹滴下的文件/文件夹复制英寸

下面是代码

navigator.webkitPersistentStorage.requestQuota(1024 * 1024 * 500, function (bytes) { 
     console.log('Allocated ' + bytes + ' bytes.'); 
     // request file system 
     window.webkitRequestFileSystem(PERSISTENT, bytes, function(fileSystem) { 
      fs = fileSystem; 
      cwd = fs.root; 

      //log query usage and quota 
      navigator.webkitPersistentStorage.queryUsageAndQuota(
      (used, total) => console.log(
       `using ${used} out of ${total}, or ${used/total*100}%`) 
      ); 

      //create temp folder 
      cwd.getDirectory('/temp', {create: true, exclusive: true}, function(directory){ 
       multiplefilesDirectory = directory; 

       console.log('directory',directory,multiplefilesDirectory); 
      }, onError); 

     }); 
    }, function (e) { 
     console.log('Failed to allocate persistant storage!'); 
    }); 

中有没有错误requestQuota。它记录Allocated 524288000 bytes. queryUsageAndQuota日志using 0 out of 0, or NaN%,这看起来像存储大小没有改变。

创建临时文件夹会记录错误Error: The operation failed because it would cause the application to exceed its storage quota.。可能是因为存储空间不变。

我犯了一个错误还是有另一种方法来做到这一点?

+1

我相信铬存储没有足够的空间用于这种事情 – Granny

检查文件系统上的可用空间。

在我的情况下,可用磁盘空间有问题。我要求1 * 1024 * 1024,并且从1TB光盘中获得7 GB的空间,使用df -h已经100%满了。 删除28GB有97%已满并开始工作。