0

Is it possible to cache DirectoryEntry once it is selected by the user so that even after refresh the contents of that directory can be accessed. The point is to eliminate dropping the directory each time the web app is opened.

Directory is accessed this way

var dropzone = document.getElementById('dropzone');
dropzone.ondrop = function(e) {
  var length = e.dataTransfer.items.length;
  for (var i = 0; i < length; i++) {
    var entry = e.dataTransfer.items[i].webkitGetAsEntry();
    if (entry.isFile) {
      ... // do whatever you want
    } else if (entry.isDirectory) {
      ... // do whatever you want
    }
  }
};
<div id=”dropzone”></div>

Is there a way to pre-select directory and ask the permission only?

Akshay Vats
  • 170
  • 9
  • no....there is not, assuming you are asking about doing this in a web browser – charlietfl Sep 20 '15 at 02:38
  • This closely relates to my question and is answered as a long NO :/ http://stackoverflow.com/questions/20537696/remember-and-repopulate-file-input – Akshay Vats Sep 20 '15 at 02:49

0 Answers0