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 1.0.0 to 1.1.0

2

package.json
{
"name": "react-s3-uploader",
"version": "1.0.0",
"version": "1.1.0",
"description": "React component that renders an <input type=\"file\"/> and automatically uploads to an S3 bucket",

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

@@ -50,2 +50,4 @@ react-s3-uploader

You must provide environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_KEY` to use the server route.
#### Access/Secret Keys
The `aws-sdk` must be configured with your account's Access Key and Secret Access Key. [There are a number of ways to provide these](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html), but setting up environment variables is the quickest. You just have to configure environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, and AWS automatically picks them up.

@@ -10,14 +10,9 @@

var AWS_ACCESS_KEY_ID = options.accessKey || process.env.AWS_ACCESS_KEY_ID,
AWS_SECRET_KEY = options.secretKey || process.env.AWS_SECRET_KEY,
S3_BUCKET = options.bucket,
var S3_BUCKET = options.bucket,
getFileKeyDir = options.getFileKeyDir || function() { return "."; };
if (!AWS_ACCESS_KEY_ID || !AWS_SECRET_KEY || !S3_BUCKET) {
throw new Error("AWS_ACCESS_KEY_ID, AWS_SECRET_KEY, and S3_BUCKET must be available.");
if (!S3_BUCKET) {
throw new Error("S3_BUCKET is required.");
}
aws.config.update({accessKeyId: AWS_ACCESS_KEY_ID , secretAccessKey: AWS_SECRET_KEY });
var router = express.Router();

@@ -24,0 +19,0 @@

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