react-s3-uploader
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "react-s3-uploader", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "React component that renders a file input and automatically uploads to an S3 bucket", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -64,3 +64,3 @@ react-s3-uploader | ||
This also provides another endpoint: `GET /s3/img/(.*)` and `GET /s3/uploads/(.*)`. This will create a temporary URL | ||
that provides access to the uploaded file (which are uploaded privately at the moment). The | ||
that provides access to the uploaded file (which are uploaded privately by default). The | ||
request is then redirected to the URL, so that the image is served to the client. | ||
@@ -124,2 +124,6 @@ | ||
##### 1.2.2 | ||
* [Fixes #48] Only setting the AWS region for the S3 client, not the global default | ||
##### 1.2.1 | ||
@@ -126,0 +130,0 @@ |
@@ -22,4 +22,6 @@ | ||
} | ||
var s3Options = {}; | ||
if (options.region) { | ||
aws.config.update({region: options.region}); | ||
s3Options.region = options.region; | ||
} | ||
@@ -38,3 +40,3 @@ | ||
}; | ||
var s3 = new aws.S3(); | ||
var s3 = new aws.S3(s3Options); | ||
s3.getSignedUrl('getObject', params, function(err, url) { | ||
@@ -72,3 +74,3 @@ res.redirect(url); | ||
var s3 = new aws.S3(); | ||
var s3 = new aws.S3(s3Options); | ||
var params = { | ||
@@ -75,0 +77,0 @@ Bucket: S3_BUCKET, |
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
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
17513
301
137