Skip to content

Commit 40d175e

Browse files
committed
update uploadFile method
1 parent d6b117b commit 40d175e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

components/aws/common/common-s3.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import {
44
CreateBucketCommand,
55
ListBucketsCommand,
66
GetObjectCommand,
7-
PutObjectCommand,
87
PutBucketPolicyCommand,
98
GetBucketNotificationConfigurationCommand,
109
PutBucketNotificationConfigurationCommand,
1110
} from "@aws-sdk/client-s3";
11+
import { Upload } from "@aws-sdk/lib-storage";
1212
import { axios } from "@pipedream/platform";
1313

1414
export default {
@@ -81,7 +81,11 @@ export default {
8181
return this._clientS3().send(new GetObjectCommand(params));
8282
},
8383
async uploadFile(params) {
84-
return this._clientS3().send(new PutObjectCommand(params));
84+
const parallelUploads3 = new Upload({
85+
client: await this._clientS3(),
86+
params,
87+
});
88+
await parallelUploads3.done();
8589
},
8690
async streamFile(fileUrl) {
8791
return axios(this, {

components/aws/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/aws",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "Pipedream Aws Components",
55
"main": "aws.app.mjs",
66
"keywords": [
@@ -25,6 +25,7 @@
2525
"@aws-sdk/client-sqs": "^3.58.0",
2626
"@aws-sdk/client-ssm": "^3.58.0",
2727
"@aws-sdk/client-sts": "^3.58.0",
28+
"@aws-sdk/lib-storage": "^3.734.0",
2829
"@aws-sdk/s3-request-presigner": "^3.609.0",
2930
"@aws-sdk/signature-v4-crt": "^3.731.0",
3031
"@pipedream/helper_functions": "^0.3.6",

0 commit comments

Comments
 (0)