chore: setting objects to expire in 3 days

This commit is contained in:
Chubby Granny Chaser 2024-12-24 04:33:24 +00:00
parent 54c6b1f1af
commit 4c6f87f6e7
No known key found for this signature in database

View File

@ -36,6 +36,8 @@ fs.readdir(dist, async (err, files) => {
Bucket: process.env.S3_BUILDS_BUCKET_NAME,
Key: fileName,
Body: fs.createReadStream(path.resolve(dist, file)),
// 3 days
Expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 3),
});
await s3.send(command);