Skip to content

Commit

Permalink
Merge pull request activepieces#2570 from activepieces/fix/s3-1
Browse files Browse the repository at this point in the history
fix(amazon-s3): invalid url when endpoint is empty is fixed
  • Loading branch information
abuaboud authored Sep 8, 2023
2 parents 8dced24 + c8e6c1c commit 91ec9dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/pieces/amazon-s3/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@activepieces/piece-amazon-s3",
"version": "0.3.0"
"version": "0.3.1"
}
5 changes: 3 additions & 2 deletions packages/pieces/amazon-s3/src/lib/common.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isNil } from "@activepieces/shared";
import { S3 } from "@aws-sdk/client-s3";


Expand All @@ -7,9 +8,9 @@ export function createS3(auth: { accessKeyId: string; secretAccessKey: string; r
accessKeyId: auth.accessKeyId,
secretAccessKey: auth.secretAccessKey,
},
forcePathStyle: auth.endpoint ? true : false,
forcePathStyle: auth.endpoint ? true : undefined,
region: auth.region,
endpoint: auth.endpoint,
endpoint:(auth.endpoint === '' || isNil(auth.endpoint)) ? undefined : auth.endpoint,
});
return s3;
}

0 comments on commit 91ec9dd

Please sign in to comment.