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

react-s3-uploader

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-s3-uploader - npm Package Compare versions

Comparing version 1.1.16 to 1.1.17

2

package.json
{
"name": "react-s3-uploader",
"version": "1.1.16",
"version": "1.1.17",
"description": "React component that renders a file input and automatically uploads to an S3 bucket",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,3 +36,3 @@ "use strict";

new S3Upload({
fileElement: this.getDOMNode(),
fileElement: findDOMNode(this),
signingUrl: this.props.signingUrl,

@@ -49,2 +49,6 @@ onProgress: this.props.onProgress,

clear: function() {
clearInputFile(findDOMNode(this));
},
render: function() {

@@ -56,3 +60,23 @@ return React.DOM.input(objectAssign({}, this.props, {type: 'file', onChange: this.uploadFile}));

function findDOMNode(cmp) {
return React.findDOMNode ? React.findDOMNode(cmp) : cmp.getDOMNode();
}
// http://stackoverflow.com/a/24608023/194065
function clearInputFile(f){
if(f.value){
try{
f.value = ''; //for IE11, latest Chrome/Firefox/Opera...
}catch(err){ }
if(f.value){ //for IE5 ~ IE10
var form = document.createElement('form'),
parentNode = f.parentNode, ref = f.nextSibling;
form.appendChild(f);
form.reset();
parentNode.insertBefore(f,ref);
}
}
}
module.exports = ReactS3Uploader;
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