react-s3-uploader
Advanced tools
Comparing version 4.0.1 to 4.0.2
{ | ||
"name": "react-s3-uploader", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "React component that renders a file input and automatically uploads to an S3 bucket", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -118,3 +118,4 @@ react-s3-uploader | ||
headers: {'Access-Control-Allow-Origin': '*'}, // optional | ||
ACL: 'private' // this is default | ||
ACL: 'private', // this is default | ||
uniquePrefix=true // this is default, setting the attribute to false preserves the original filename in S3 | ||
})); | ||
@@ -185,79 +186,1 @@ ``` | ||
If you do some work on another server, and would love to contribute documentation, please send us a PR! | ||
Changelog (Starting at 1.2.0) | ||
------------ | ||
##### 4.0.1 | ||
* Don't pass `scrubFilename` prop to `<input>` | ||
##### 4.0.0 | ||
* BREAKING CHANGE: Removed `unorm` and `latinize` dependencies, which were used to scrub file names before uploading. Now we just remove all characters that are not alphanumeric, underscores, dashes, or periods. If you need different behavior, please provide a custom `scrubFilename` function in props. | ||
##### 3.4.0 | ||
* Adding optional prop `signingUrlMethod` (default: `GET`) [#103] | ||
* Adding optional prop `signingUrlWithCredentials` [#103] | ||
* Adding `abort` to react component [#96] | ||
##### 3.3.0 | ||
* Adding optional preprocess hook supports asynchronous operations such as resizing an image before upload [#79 #72] | ||
* Fix uglify warning [#77] | ||
##### 3.2.1 | ||
* Avoid react warning by not passing unnecessary props to Dom.input [#75] | ||
##### 3.2.0 | ||
* Allow custom getSignedUrl() function to be provided [#22] | ||
##### 3.1.0 | ||
* Replace unsafe characters (per AWS docs) with underscores [#69] | ||
##### 3.0.3 | ||
* Support signatureVersion option | ||
##### 3.0.2 | ||
* Not passing non-JSON response text to error handlers | ||
##### 3.0.1 | ||
* Fixes issue where URL would include "undefined" if this.server was not specified | ||
##### 3.0 | ||
* Using `react-dom` | ||
##### 2.0.1 | ||
* Fixes issue where URL would include "undefined" if this.server was not specified | ||
##### 2.0 | ||
* **Breaking Change** [Fixes #52] Removing `express` as a `peerDependency`. Projects should explicitly depend on `express` to use the bundled router | ||
* [Fixes #51] url encode the contentType | ||
##### 1.2.3 | ||
* Fixes issue where URL would include "undefined" if this.server was not specified | ||
##### 1.2.2 | ||
* [Fixes #48] Only setting the AWS region for the S3 client, not the global default | ||
##### 1.2.1 | ||
* Added `server` prop to `ReactS3Uploader` to support running the signing server on a different domain | ||
* Added `headers` option to `s3router` to support specifying `'Access-Control-Allow-Origin'` header (or any others) | ||
* [Fixes #44] Using `unorm.nfc(str)` in favor of `str.normalize()` | ||
##### 1.2.0 | ||
* Added dependencies `unorm` and `latinize` for uploading files with non-latin characters. | ||
* Filenames are normalized, latinized, and whitespace is stripped before uploading |
@@ -30,2 +30,5 @@ | ||
} | ||
if (options.uniquePrefix === undefined) { | ||
options.uniquePrefix = true; | ||
} | ||
@@ -68,3 +71,3 @@ var router = express.Router(); | ||
router.get('/sign', function(req, res) { | ||
var filename = uuid.v4() + "_" + req.query.objectName; | ||
var filename = (options.uniquePrefix ? uuid.v4() + "_" : "") + req.query.objectName; | ||
var mimeType = req.query.contentType; | ||
@@ -71,0 +74,0 @@ var fileKey = checkTrailingSlash(getFileKeyDir(req)) + filename; |
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
23439
9
351
185