rc-upload
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -32,7 +32,12 @@ 'use strict'; | ||
componentDidMount: function componentDidMount() { | ||
var _this = this; | ||
var el = React.findDOMNode(this); | ||
this.setState({ | ||
width: el.offsetWidth, | ||
height: el.offsetHeight | ||
}); | ||
// Fix render bug in IE | ||
setTimeout(function () { | ||
_this.setState({ | ||
width: el.offsetWidth, | ||
height: el.offsetHeight | ||
}); | ||
}, 0); | ||
}, | ||
@@ -82,2 +87,5 @@ | ||
this.file = e.target.files && e.target.files[0] || e.target; | ||
// ie8/9 don't support FileList Object | ||
// http://stackoverflow.com/questions/12830058/ie8-input-type-file-get-files | ||
this.file.name = this.file.name || e.target.value; | ||
this.props.onStart(this.file); | ||
@@ -84,0 +92,0 @@ React.findDOMNode(this.refs.form).submit(); |
@@ -41,3 +41,3 @@ 'use strict'; | ||
// node环境或者支持FormData的情况使用AjaxUpload | ||
if (isNode || typeof FormData === 'function') { | ||
if (isNode || typeof FormData !== undefined) { | ||
return React.createElement(AjaxUpload, props); | ||
@@ -44,0 +44,0 @@ } |
{ | ||
"name": "rc-upload", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "upload ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
9457
226
1