Comparing version 0.0.3 to 0.0.4
19
aws3.js
@@ -17,5 +17,5 @@ /* jshint laxcomma: true */ | ||
* var aws3 = new Aws3('file.txt', 'text/plain', 'a/unique/optional/path'); | ||
* var getUrl = aws3.signedUrl('get'); // Public or private s3 url | ||
* var putUrl = aws3.signedUrl('put'); // Signed url for CORS put | ||
* var deleteUrl = aws3.signedUrl('del'); // Signed url for CORS delete | ||
* var getUrl = aws3.signedUrl('get'); // Public or private s3 url | ||
* var putUrl = aws3.signedUrl('put'); // Signed url for CORS put | ||
* var deleteUrl = aws3.signedUrl('delete'); // Signed url for CORS delete | ||
* | ||
@@ -37,4 +37,8 @@ */ | ||
Aws3.prototype.generateSignedRequest = function(method) { | ||
return [this.fileUrl(), this.keyAndExpiresParams()+'&Signature='+this.signature(method)].join('?'); | ||
Aws3.prototype.generateSignedRequest = function(method, encoded) { | ||
var signature = this.signature(method); | ||
if (encoded) { | ||
signature = encodeURIComponent(signature); | ||
} | ||
return [this.fileUrl(), this.keyAndExpiresParams()+'&Signature='+signature].join('?'); | ||
}; | ||
@@ -77,2 +81,3 @@ | ||
/* | ||
@@ -138,5 +143,5 @@ * @api private | ||
Aws3.prototype.signedUrl = function(method) { | ||
return this.generateSignedRequest(method); | ||
Aws3.prototype.signedUrl = function(method, encoded) { | ||
return this.generateSignedRequest(method, encoded); | ||
}; | ||
{ | ||
"name": "aws3.js", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Simple AWS S3 Generator", | ||
@@ -5,0 +5,0 @@ "main": "aws3.js", |
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
7046
210