Download and delete file with S3 [closed]
what I am trying to do is download a file with S3, once the file is downloaded delete it
Note: All this process has to be executed at a certain time of day, is there any way to do it?
const DowloadCSV = async () => {
Storage.get('excel/ListadePrecios.csv"', { expires: 60 })
.then(result => console.log(result))
.catch(err => console.log(err));
}
const s3delete = function () {
return new Promise((resolve, reject) => {
s3.createBucket({
Bucket: BUCKET_NAME
},
function () {
s3.deleteObject(params, function (err, data) {
if (err)
console.log(err);
else
console.log("Successfully deleted file from bucket")
console.log(data);
})
})
})
}
from Recent Questions - Stack Overflow https://ift.tt/3mzAgJH
https://ift.tt/eA8V8J
Comments
Post a Comment