react-s3-uploader
Advanced tools
Comparing version 4.6.1 to 4.6.2
##### 4.6.2 | ||
* Fix `undefined` in file path when not providing `s3path` prop [#160] | ||
##### 4.6.1 | ||
@@ -3,0 +7,0 @@ |
{ | ||
"name": "react-s3-uploader", | ||
"version": "4.6.1", | ||
"version": "4.6.2", | ||
"description": "React component that renders a file input and automatically uploads to an S3 bucket", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -81,3 +81,3 @@ var uuidv4 = require('uuid/v4'), | ||
router.get('/sign', middleware, function(req, res) { | ||
var filename = req.query.path + (options.uniquePrefix ? uuidv4() + "_" : "") + req.query.objectName; | ||
var filename = (req.query.path || '') + (options.uniquePrefix ? uuidv4() + "_" : "") + req.query.objectName; | ||
var mimeType = req.query.contentType; | ||
@@ -84,0 +84,0 @@ var fileKey = checkTrailingSlash(getFileKeyDir(req)) + filename; |
@@ -81,3 +81,6 @@ /** | ||
var fileName = this.scrubFilename(file.name); | ||
var queryString = '?objectName=' + fileName + '&contentType=' + encodeURIComponent(file.type) + '&path=' + this.s3path; | ||
var queryString = '?objectName=' + fileName + '&contentType=' + encodeURIComponent(file.type); | ||
if (this.s3path) { | ||
queryString += '&path=' + encodeURIComponent(this.s3path); | ||
} | ||
if (this.signingUrlQueryParams) { | ||
@@ -84,0 +87,0 @@ var signingUrlQueryParams = typeof this.signingUrlQueryParams === 'function' ? this.signingUrlQueryParams() : this.signingUrlQueryParams; |
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
27331
392