Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 21b1651

Browse files
committed
add xhr upload option, see pull request #206
1 parent d98b96c commit 21b1651

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/http/client/xhr.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ module.exports = function (request) {
3737
_.extend(xhr, request.xhr);
3838
}
3939

40+
if (_.isPlainObject(request.upload)) {
41+
_.extend(xhr.upload, request.upload);
42+
}
43+
4044
_.each(request.headers || {}, function (value, header) {
4145
xhr.setRequestHeader(header, value);
4246
});

src/http/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Http.options = {
4848
params: {},
4949
headers: {},
5050
xhr: null,
51+
upload: null,
5152
jsonp: 'callback',
5253
beforeSend: null,
5354
crossOrigin: null,

0 commit comments

Comments
 (0)