aws-v3-sdk 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -273,7 +273,7 @@ class DocumentClient {
273
273
  batchGetAsync (params, callback) {
274
274
  return new Promise((resolve, reject) => {
275
275
  const docClient = DynamoDBDocument.from(new DynamoDB())
276
- docClient.batchGet(params, function (err, data) {
276
+ docClient.batchGet(params, function (err, response) {
277
277
  if (err) reject(err)
278
278
  else {
279
279
  return resolve(response)
package/clients/s3.js CHANGED
@@ -1,4 +1,4 @@
1
- const { S3Client, GetObjectCommand, PutObjectCommand, ListObjectsCommand, DeleteObjectsCommand, CreateMultipartUploadCommand, CompleteMultipartUploadCommand } = require('@aws-sdk/client-s3')
1
+ const { S3Client, GetObjectCommand, PutObjectCommand, ListObjectsCommand, DeleteObjectsCommand, CreateMultipartUploadCommand, CompleteMultipartUploadCommand, UploadPartCommand } = require('@aws-sdk/client-s3')
2
2
  const { getSignedUrl } = require('@aws-sdk/s3-request-presigner')
3
3
  const client = new S3Client({})
4
4
 
@@ -23,6 +23,15 @@ class S3 {
23
23
  }).catch(err => {
24
24
  resolve(err)
25
25
  })
26
+ } else if (type === 'uploadPart') {
27
+ const Expires = params.Expires
28
+ delete params.Expires
29
+ const command = new UploadPartCommand(params)
30
+ getSignedUrl(client, command, { expiresIn: Expires }).then(url => {
31
+ resolve(url)
32
+ }).catch(err => {
33
+ resolve(err)
34
+ })
26
35
  }
27
36
  }).then(result => {
28
37
  if (callback && typeof callback === 'function') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-v3-sdk",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "AWS v3 SDK Utils",
5
5
  "main": "index.js",
6
6
  "scripts": {