code: function processItem(item, path, items, cb) {
        var entry;
        if(item.isFile){
          // file provided
          return item.file(function(file){
            file.relativePath = path + file.name;
            items.push(file);
            cb();
          });
        }else if(item.isDirectory){
          // item is already a directory entry, just assign
          entry = item;
        }else if(item instanceof File) {
          items.push(item);
        }
        if('function' === typeof item.webkitGetAsEntry){
          // get entry from file object
          entry = item.webkitGetAsEntry();
        }
        if(entry && entry.isDirectory){
          // directory provided, process it
          return processDirectory(entry, path + entry.name + '/', items, cb);
        }
        if('function' === typeof item.getAsFile){
          // item represents a File object, convert it
          item = item.getAsFile();
          if(item instanceof File) {
            item.relativePath = path + item.name;
            items.push(item);
          }
        }
        cb(); // indicate processing is done
      }
docs: processes a single upload item (file or directory)
  @param {Object} item item to upload, may be file or directory entry
  @param {string} path current file path
  @param {File[]} items list of files to append new items to
  @param {Function} cb callback invoked when item is processed