2017-12-18 2 views
0

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

답변

0

파일 시스템의 여유 공간을 확인하십시오.

필자의 경우 여유 디스크 공간에 문제가있었습니다. 나는 1 * 1024 * 1024를 요구했고 1TB 디스크에서 7GB를 무료로 가지고있었습니다. 그 디스크는 df -h을 사용하여 100 % 가득 차있었습니다. 28GB를 제거하여 97 %가 가득 차서 작업하기 시작했습니다.

관련 문제