dist/vue-upload-component.js
// DataTransfer - Add files that are dragged or pasted into the upload list
Add files that are dragged or pasted into the upload list
Add files that are dragged or pasted into the upload list
function addDataTransfer(dataTransfer) {
      var _this = this;
      var files = [];
      if (dataTransfer.items && dataTransfer.items.length) {
        var items = [];
        for (var i = 0; i < dataTransfer.items.length; i++) {
          var item = dataTransfer.items[i];
          if (item.getAsEntry) {
            item = item.getAsEntry() || item.getAsFile();
          } else if (item.webkitGetAsEntry) {
            item = item.webkitGetAsEntry() || item.getAsFile();
          } else {
            item = item.getAsFile();
          }
          if (item) {
            items.push(item);
          }
        }
        return new Promise(function (resolve, reject) {
          var forEach = function forEach(i) {
            var item = items[i];
            if (!item || _this.maximum > 0 && files.length >= _this.maximum) {
              return resolve(_this.add(files));
            }
            _this.getEntry(item).then(function (results) {
              files.push.apply(files, results);
              forEach(i + 1);
            });
          };
          forEach(0);
        });
      }
      if (dataTransfer.files.length) {
        for (var _i3 = 0; _i3 < dataTransfer.files.length; _i3++) {
          files.push(dataTransfer.files[_i3]);
          if (this.maximum > 0 && files.length >= this.maximum) {
            break;
          }
        }
        return Promise.resolve(this.add(files));
      }
      return Promise.resolve([]);
    }
function addDataTransfer ( dataTransfer ) { var _this = this ; var files = [ ] ; if ( dataTransfer . items && dataTransfer . items . length ) { var items = [ ] ; for ( var i = 0 ; i < dataTransfer . items . length ; i ++ ) { var item = dataTransfer . items [ i ] ; if ( item . getAsEntry ) { item = item . getAsEntry ( ) || item . getAsFile ( ) ; } else if ( item . webkitGetAsEntry ) { item = item . webkitGetAsEntry ( ) || item . getAsFile ( ) ; } else { item = item . getAsFile ( ) ; } if ( item ) { items . push ( item ) ; } } return new Promise ( function ( resolve , reject ) { var forEach = function forEach ( i ) { var item = items [ i ] ; if ( ! item || _this . maximum > 0 && files . length >= _this . maximum ) { return resolve ( _this . add ( files ) ) ; } _this . getEntry ( item ) . then ( function ( results ) { files . push . apply ( files , results ) ; forEach ( i + 1 ) ; } ) ; } ; forEach ( 0 ) ; } ) ; } if ( dataTransfer . files . length ) { for ( var _i3 = 0 ; _i3 < dataTransfer . files . length ; _i3 ++ ) { files . push ( dataTransfer . files [ _i3 ] ) ; if ( this . maximum > 0 && files . length >= this . maximum ) { break ; } } return Promise . resolve ( this . add ( files ) ) ; } return Promise . resolve ( [ ] ) ; }
DataTransfer - Add files that are dragged or pasted into the upload list
DataTransfer - Add files that are dragged or pasted into the upload list