Skip to content

Commit

Permalink
Fix delete content
Browse files Browse the repository at this point in the history
  • Loading branch information
mrarticuno committed Nov 12, 2023
1 parent aae1646 commit 1997f34
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ const getSignedUrlPromise = async (ContentType) => {
};

const deleteFile = async (file) => {
const s3Client = new S3Client({
region: process.env.AWS_REG,
});
const clientParams = {
credentials: {
accessKeyId,
secretAccessKey,
},
region,
};
const s3Client = new S3Client(clientParams);
const command = new DeleteObjectCommand({
Bucket: bucketName,
Key: file,
Expand Down

0 comments on commit 1997f34

Please sign in to comment.