rc-upload
Advanced tools
Comparing version 2.3.8 to 2.4.0
@@ -139,5 +139,5 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
} : null, | ||
onSuccess: function onSuccess(ret) { | ||
onSuccess: function onSuccess(ret, xhr) { | ||
delete _this3.reqs[uid]; | ||
props.onSuccess(ret, file); | ||
props.onSuccess(ret, file, xhr); | ||
}, | ||
@@ -144,0 +144,0 @@ onError: function onError(err, ret) { |
@@ -67,3 +67,3 @@ function getError(option, xhr) { | ||
option.onSuccess(getBody(xhr)); | ||
option.onSuccess(getBody(xhr), xhr); | ||
}; | ||
@@ -70,0 +70,0 @@ |
# History | ||
---- | ||
### 2.4.0 / 2017-07-15 | ||
- Add XHR for onSuccess callback by @xiangkaiy [!85](https://github.com/react-component/upload/pull/85) | ||
### 2.3.8 / 2017-06-21 | ||
@@ -5,0 +9,0 @@ |
@@ -177,5 +177,5 @@ 'use strict'; | ||
} : null, | ||
onSuccess: function onSuccess(ret) { | ||
onSuccess: function onSuccess(ret, xhr) { | ||
delete _this3.reqs[uid]; | ||
props.onSuccess(ret, file); | ||
props.onSuccess(ret, file, xhr); | ||
}, | ||
@@ -182,0 +182,0 @@ onError: function onError(err, ret) { |
@@ -73,3 +73,3 @@ 'use strict'; | ||
option.onSuccess(getBody(xhr)); | ||
option.onSuccess(getBody(xhr), xhr); | ||
}; | ||
@@ -76,0 +76,0 @@ |
{ | ||
"name": "rc-upload", | ||
"version": "2.3.8", | ||
"version": "2.4.0", | ||
"description": "upload ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -86,2 +86,4 @@ # rc-upload | ||
2. `file`: upload file | ||
3. `xhr`: xhr header, only for modern browsers which support AJAX upload. since | ||
2.4.0 | ||
@@ -117,2 +119,4 @@ | ||
What's more, in iframe mode, the response's status should always be `200 OK`, otherwise you might get an `Access is denied` error in IE 8/9. | ||
#### Domain Problem | ||
@@ -119,0 +123,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57879
135