Skip to content

Commit 906303a

Browse files
author
yuangongji
authored
Merge pull request #878 from ygj6/fix874
fixed issue #874
2 parents 808924e + 5425591 commit 906303a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/services/FileUploader.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,7 @@ export default function __identity(fileUploaderOptions, $rootScope, $http, $wind
511511
var response = this._transformResponse(xhr.response, headers);
512512
this._onCancelItem(item, response, xhr.status, headers);
513513
this._onCompleteItem(item, response, xhr.status, headers);
514-
};
515-
516-
xhr.timeout = item.timeout || 0;
514+
};
517515

518516
xhr.ontimeout = (e) => {
519517
var headers = this._parseHeaders(xhr.getAllResponseHeaders());
@@ -524,6 +522,7 @@ export default function __identity(fileUploaderOptions, $rootScope, $http, $wind
524522

525523
xhr.open(item.method, item.url, true);
526524

525+
xhr.timeout = item.timeout || 0;
527526
xhr.withCredentials = item.withCredentials;
528527

529528
forEach(item.headers, (value, name) => {

0 commit comments

Comments
 (0)