|
|
|
@ -726,15 +726,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
file.removed = true;
|
|
|
|
file.removed = true;
|
|
|
|
var xhr = this._files[id].xhr;
|
|
|
|
var xhr = this._files[id].xhr;
|
|
|
|
if (xhr) {
|
|
|
|
if (xhr) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
xhr.abort();
|
|
|
|
xhr.abort();
|
|
|
|
xhr.timeout = 1;
|
|
|
|
xhr.timeout = 1;
|
|
|
|
|
|
|
|
} catch (e) {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var iframe = this._files[id].iframe;
|
|
|
|
var iframe = this._files[id].iframe;
|
|
|
|
if (iframe) {
|
|
|
|
if (iframe) {
|
|
|
|
iframe.onabort({ type: 'abort' });
|
|
|
|
iframe.onabort({ type: 'abort' });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete this._files[id];
|
|
|
|
delete this._files[id];
|
|
|
|
this._events('removeFileUpload', file);
|
|
|
|
this._uploadEvents('removeFileUpload', file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this._index = 0;
|
|
|
|
this._index = 0;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -756,7 +758,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
this.files.splice(0, this.files.length);
|
|
|
|
this.files.splice(0, this.files.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
_events: function _events(name, file) {
|
|
|
|
_uploadEvents: function _uploadEvents(name, file) {
|
|
|
|
this.$dispatch && this.$dispatch(name, file, this);
|
|
|
|
this.$dispatch && this.$dispatch(name, file, this);
|
|
|
|
this[name] && this[name](file);
|
|
|
|
this[name] && this[name](file);
|
|
|
|
this.events && this.events[name] && this.events[name](file, this);
|
|
|
|
this.events && this.events[name] && this.events[name](file, this);
|
|
|
|
@ -837,7 +839,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
this._files[file.id] = hiddenData;
|
|
|
|
this._files[file.id] = hiddenData;
|
|
|
|
file = this.files[this.files.push(file) - 1];
|
|
|
|
file = this.files[this.files.push(file) - 1];
|
|
|
|
this._files[file.id]._file = file;
|
|
|
|
this._files[file.id]._file = file;
|
|
|
|
this._events('addFileUpload', file);
|
|
|
|
this._uploadEvents('addFileUpload', file);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
_onDrop: function _onDrop(e) {
|
|
|
|
_onDrop: function _onDrop(e) {
|
|
|
|
this._dropActive = 0;
|
|
|
|
this._dropActive = 0;
|
|
|
|
@ -953,7 +955,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
speedTime = speedTime2;
|
|
|
|
speedTime = speedTime2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_self._events('fileUploadProgress', file);
|
|
|
|
_self._uploadEvents('fileUploadProgress', file);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var callback = function callback(e) {
|
|
|
|
var callback = function callback(e) {
|
|
|
|
@ -1002,7 +1004,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
if (!fileUploads) {
|
|
|
|
if (!fileUploads) {
|
|
|
|
fileUploads = true;
|
|
|
|
fileUploads = true;
|
|
|
|
if (!file.removed) {
|
|
|
|
if (!file.removed) {
|
|
|
|
_self._events('afterFileUpload', file);
|
|
|
|
_self._uploadEvents('afterFileUpload', file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|
_self._fileUploads();
|
|
|
|
_self._fileUploads();
|
|
|
|
@ -1047,7 +1049,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
this._events('beforeFileUpload', file);
|
|
|
|
this._uploadEvents('beforeFileUpload', file);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
_fileUploadPut: function _fileUploadPut(file) {
|
|
|
|
_fileUploadPut: function _fileUploadPut(file) {
|
|
|
|
var _self = this;
|
|
|
|
var _self = this;
|
|
|
|
@ -1194,7 +1196,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
fileUploads = true;
|
|
|
|
fileUploads = true;
|
|
|
|
iframe.parentNode && iframe.parentNode.removeChild(iframe);
|
|
|
|
iframe.parentNode && iframe.parentNode.removeChild(iframe);
|
|
|
|
if (!file.removed) {
|
|
|
|
if (!file.removed) {
|
|
|
|
_self._events('afterFileUpload', file);
|
|
|
|
_self._uploadEvents('afterFileUpload', file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setTimeout(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|
_self._fileUploads();
|
|
|
|
_self._fileUploads();
|
|
|
|
@ -1221,7 +1223,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, 50);
|
|
|
|
}, 50);
|
|
|
|
_self._events('beforeFileUpload', file);
|
|
|
|
_self._uploadEvents('beforeFileUpload', file);
|
|
|
|
}, 10);
|
|
|
|
}, 10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|