rc-upload
Advanced tools
Comparing version 1.2.4-beta2 to 1.3.0
@@ -0,1 +1,5 @@ | ||
### 1.3.0 2015-08-12 | ||
- onError arguments change to `err, responce, file` | ||
### 1.2.3 2015-07-17 | ||
@@ -2,0 +6,0 @@ |
@@ -56,4 +56,3 @@ 'use strict'; | ||
if (err || ret.status !== 200) { | ||
var message = err ? err.message : ret.text; | ||
props.onError(message, file); | ||
props.onError(err, ret, file); | ||
return; | ||
@@ -60,0 +59,0 @@ } |
@@ -57,3 +57,3 @@ 'use strict'; | ||
response = 'cross-domain'; | ||
props.onError(err); | ||
props.onError(err, null, this.file); | ||
} | ||
@@ -81,3 +81,3 @@ | ||
this.startUpload = true; | ||
this.file = e.target.files[0]; | ||
this.file = e.target.files && e.target.files[0] || e.target; | ||
this.props.onStart(this.file); | ||
@@ -84,0 +84,0 @@ React.findDOMNode(this.refs.form).submit(); |
{ | ||
"name": "rc-upload", | ||
"version": "1.2.4-beta2", | ||
"version": "1.3.0", | ||
"description": "upload ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -25,3 +25,3 @@ # rc-upload | ||
online example: http://react-component.github.io/upload/build/examples/ | ||
online example: http://react-component.github.io/upload/examples/simple.html | ||
@@ -60,4 +60,15 @@ | ||
#### onError arguments | ||
1. `err`: request error message | ||
2. `responce`: request responce, not support on iframeUpload | ||
3. `file`: upload file object | ||
### onSuccess arguments | ||
1. `result`: request body | ||
2. `file`: upload file | ||
## License | ||
rc-upload is released under the MIT license. |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9020
0
73
214