const s3 = new AWS.S3({
accessKeyId: process.env.AWS_ID,
secretAccessKey: process.env.AWS_SECRET,
});
const params = {
Bucket: process.env.AWS_BUCKET_NAME,
Key: `folder/subfolder/filename.fileExtension`
};
s3.deleteObject(params, (error, data) => {
if (error) {
res.status(500).send(error);
}
res.status(200).send("File has been deleted successfully");
});
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Hello Md. Abdul Halim Rafi
Can you show other AWS s3 object operations like update/edit object, upload object.
Thanks