@alpha-lambda/aws-drivers
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -54,3 +54,3 @@ 'use strict'; | ||
putObject(context, { bucket, data, key }) { | ||
putObject(context, { bucket, data, key }, params) { | ||
assert(context, 'missing context'); | ||
@@ -61,5 +61,4 @@ assert(bucket, 'missing bucket'); | ||
const putParams = { | ||
Body: typeof data === 'string' | ||
? data | ||
: JSON.stringify(data), | ||
...params, | ||
Body: data, | ||
Bucket: bucket, | ||
@@ -66,0 +65,0 @@ Key: key || uuid.v4() |
{ | ||
"name": "@alpha-lambda/aws-drivers", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Wrappers for AWS SDK services that make life easier (sometimes)", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -53,7 +53,8 @@ # aws-drivers | ||
#### putObject(context, { bucket, data, [key] }) | ||
#### putObject(context, { bucket, data, [key] }, params) | ||
Adds an object to a bucket. | ||
- **bucket** - { String } - name of the bucket | ||
- **data** - { Any } - object data; can be a String or any type that can be stringified | ||
- **data** - { Buffer | Typed Array | Blob | String | ReadableStream } - object data | ||
- **[key]** - { String } - object key [random UUID by default] | ||
- **[params]** - { Object } - any additional input parameters that [S3.putObject][s3-put-object-url] allows | ||
@@ -129,1 +130,2 @@ ### SQS | ||
[npm-image]: https://img.shields.io/npm/v/@alpha-lambda/aws-drivers.svg | ||
[s3-put-object-url]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#putObject-property |
Sorry, the diff of this file is too big to display
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
141972
130
3639