react-s3-uploader
Advanced tools
Comparing version 4.7.1 to 4.8.0
##### 4.8.0 | ||
* Allow 201 response code from PUT [#174] | ||
##### 4.7.0 | ||
@@ -3,0 +7,0 @@ |
{ | ||
"name": "react-s3-uploader", | ||
"version": "4.7.1", | ||
"version": "4.8.0", | ||
"description": "React component that renders a file input and automatically uploads to an S3 bucket", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,3 +9,3 @@ /** | ||
S3Upload.prototype.signingUrlMethod = 'GET'; | ||
S3Upload.prototype.signingUrlSuccessResponses = [200, 201]; | ||
S3Upload.prototype.successResponses = [200, 201]; | ||
S3Upload.prototype.fileElement = null; | ||
@@ -106,3 +106,3 @@ S3Upload.prototype.files = null; | ||
xhr.onreadystatechange = function() { | ||
if (xhr.readyState === 4 && this.signingUrlSuccessResponses.indexOf(xhr.status) >= 0) { | ||
if (xhr.readyState === 4 && this.successResponses.indexOf(xhr.status) >= 0) { | ||
var result; | ||
@@ -117,3 +117,3 @@ try { | ||
return callback(result); | ||
} else if (xhr.readyState === 4 && this.signingUrlSuccessResponses.indexOf(xhr.status) < 0) { | ||
} else if (xhr.readyState === 4 && this.successResponses.indexOf(xhr.status) < 0) { | ||
return this.onError('Could not contact request signing server. Status = ' + xhr.status, file); | ||
@@ -131,3 +131,3 @@ } | ||
xhr.onload = function() { | ||
if (xhr.status === 200) { | ||
if (this.successResponses.indexOf(xhr.status) >= 0) { | ||
this.onProgress(100, 'Upload completed', file); | ||
@@ -134,0 +134,0 @@ return this.onFinishS3Put(signResult, file); |
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
27821