Socket
Socket
Sign inDemoInstall

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 4.1.1 to 4.2.0

7

CHANGELOG.md
##### 4.2.0
* Switch to `uuid` instead of `node-uuid` [#115]
* Not using `React.DOM.input` [#127]
* Allow function for `signingUrlHeaders`
* Support setting headers in `signResult` callback
##### 4.1.1

@@ -3,0 +10,0 @@

6

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

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

"create-react-class": "^15.5.2",
"node-uuid": "1.x",
"object-assign": "^2.0.0",
"prop-types": "^15.5.8"
"prop-types": "^15.5.8",
"uuid": "^3.1.0"
},

@@ -34,0 +34,0 @@ "peerDependencies": {

@@ -20,3 +20,6 @@ "use strict";

signingUrlMethod: PropTypes.string,
signingUrlHeaders: PropTypes.object,
signingUrlHeaders: PropTypes.oneOfType([
PropTypes.object,
PropTypes.func
]),
signingUrlQueryParams: PropTypes.oneOfType([

@@ -85,3 +88,3 @@ PropTypes.object,

render: function() {
return React.DOM.input(this.getInputProps());
return React.createElement('input', this.getInputProps());
},

@@ -88,0 +91,0 @@

@@ -119,3 +119,3 @@ react-s3-uploader

ACL: 'private', // this is default
uniquePrefix=true // (4.0.2 and above) default is true, setting the attribute to false preserves the original filename in S3
uniquePrefix: true // (4.0.2 and above) default is true, setting the attribute to false preserves the original filename in S3
}));

@@ -122,0 +122,0 @@ ```

@@ -1,3 +0,2 @@

var uuid = require('node-uuid'),
var uuidv4 = require('uuid/v4'),
aws = require('aws-sdk'),

@@ -70,3 +69,3 @@ express = require('express');

router.get('/sign', function(req, res) {
var filename = (options.uniquePrefix ? uuid.v4() + "_" : "") + req.query.objectName;
var filename = (options.uniquePrefix ? uuidv4() + "_" : "") + req.query.objectName;
var mimeType = req.query.contentType;

@@ -73,0 +72,0 @@ var fileKey = checkTrailingSlash(getFileKeyDir(req)) + filename;

@@ -91,3 +91,3 @@ /**

if (this.signingUrlHeaders) {
var signingUrlHeaders = this.signingUrlHeaders;
var signingUrlHeaders = typeof this.signingUrlHeaders === 'function' ? this.signingUrlHeaders() : this.signingUrlHeaders;
Object.keys(signingUrlHeaders).forEach(function(key) {

@@ -154,2 +154,9 @@ var val = signingUrlHeaders[key];

}
if (signResult.headers) {
var signResultHeaders = signResult.headers
Object.keys(signResultHeaders).forEach(function(key) {
var val = signResultHeaders[key];
xhr.setRequestHeader(key, val);
})
}
if (this.uploadRequestHeaders) {

@@ -156,0 +163,0 @@ var uploadRequestHeaders = this.uploadRequestHeaders;

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