fullPath property

Returns the relative path to the top directory of the WebKitEntry.


var dz = document.getElementById("dropzone");
dz.ondrop = function(e) {
  e.stopPropagation();
  e.preventDefault();

  cItems = e.dataTransfer.items.length;
  for (var i=0; i < cItems; i++) {
    var entry = e.dataTransfer.items[i].webkitGetAsEntry();
    var path = entry.fullPath;
    if (entry.isFile) {
      // Process files
      entyr.fullPath
    } else if (entry.isDirectory) {
      // Traverse directories to process individual files
    }
  }
}
dz.ondragover = function (e) {
  e.preventDefault()}

Syntax

JavaScript

 

Remarks

Despite its name, this property does not expose the absolute path of the WebKitEntry on the user's local computer.

 

 

Show: