Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-upload

Package Overview
Dependencies
Maintainers
3
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-upload - npm Package Compare versions

Comparing version 1.13.2 to 1.13.3

5

HISTORY.md
# History
----
### 1.14.0 / 2016-06-14
- https://github.com/react-component/upload/pull/41
- https://github.com/react-component/upload/pull/40
### 1.13.0 / 2016-06-02

@@ -5,0 +10,0 @@

20

lib/AjaxUploader.js

@@ -83,6 +83,10 @@ 'use strict';

uploadFiles: function uploadFiles(files) {
var len = files.length;
var postFiles = Array.prototype.slice.call(files);
if (!this.props.multiple) {
postFiles = postFiles.slice(0, 1);
}
var len = postFiles.length;
if (len > 0) {
for (var i = 0; i < len; i++) {
var file = files.item(i);
var file = postFiles[i];
file.uid = (0, _uid2['default'])();

@@ -92,5 +96,5 @@ this.upload(file);

if (this.props.multiple) {
this.props.onStart(Array.prototype.slice.call(files));
this.props.onStart(postFiles);
} else {
this.props.onStart(Array.prototype.slice.call(files)[0]);
this.props.onStart(postFiles[0]);
}

@@ -110,4 +114,8 @@ }

if (before && before.then) {
before.then(function () {
_this.post(file);
before.then(function (processedFile) {
if (Object.prototype.toString.call(processedFile) === '[object File]') {
_this.post(processedFile);
} else {
_this.post(file);
}
}, function () {

@@ -114,0 +122,0 @@ _this._reset();

@@ -35,2 +35,3 @@ 'use strict';

};
var IframeUploader = _react2['default'].createClass({

@@ -63,3 +64,3 @@ displayName: 'IframeUploader',

onLoad: function onLoad() {
if (this.state.disabled) {
if (!this.state.disabled) {
return;

@@ -109,5 +110,5 @@ }

dataSpan.innerHTML = inputs.join('');
this.disabledIframe();
formNode.submit();
dataSpan.innerHTML = '';
this.disabledIframe();
},

@@ -177,2 +178,4 @@

if (this.state.disabled) {
// hack avoid batch
this.state.disabled = false;
this.setState({

@@ -186,2 +189,3 @@ disabled: false

if (!this.state.disabled) {
this.state.disabled = true;
this.setState({

@@ -188,0 +192,0 @@ disabled: true

{
"name": "rc-upload",
"version": "1.13.2",
"version": "1.13.3",
"description": "upload ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc