Fixing bug in response
This commit is contained in:
@@ -298,6 +298,7 @@ export class FileUploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected _xhrTransport(item:FileItem):any {
|
protected _xhrTransport(item:FileItem):any {
|
||||||
|
let that = this;
|
||||||
let xhr = item._xhr = new XMLHttpRequest();
|
let xhr = item._xhr = new XMLHttpRequest();
|
||||||
let sendable:any;
|
let sendable:any;
|
||||||
this._onBeforeUploadItem(item);
|
this._onBeforeUploadItem(item);
|
||||||
@@ -366,7 +367,7 @@ export class FileUploader {
|
|||||||
}
|
}
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == XMLHttpRequest.DONE) {
|
if (xhr.readyState == XMLHttpRequest.DONE) {
|
||||||
this.response.emit(xhr.responseText)
|
that.response.emit(xhr.responseText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.options.formatDataFunctionIsAsync) {
|
if (this.options.formatDataFunctionIsAsync) {
|
||||||
|
|||||||
Reference in New Issue
Block a user