From 47412537816b223b9a7ed43306d23c9e2d842e8d Mon Sep 17 00:00:00 2001 From: Jason Lin Date: Tue, 1 Aug 2023 17:24:33 -0400 Subject: [PATCH] Change file url expires to 1 hour. --- services/app-web/src/s3/s3Amplify.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/app-web/src/s3/s3Amplify.ts b/services/app-web/src/s3/s3Amplify.ts index ba7649f5dc..0b5fa71bbd 100644 --- a/services/app-web/src/s3/s3Amplify.ts +++ b/services/app-web/src/s3/s3Amplify.ts @@ -153,6 +153,7 @@ function newAmplifyS3Client(bucketConfig: S3BucketConfigType): S3ClientT { ): Promise => { const result = await Storage.get(key, { bucket: bucketConfig[bucket], + expires: 3600, }) if (typeof result === 'string') { return result @@ -189,7 +190,7 @@ function newAmplifyS3Client(bucketConfig: S3BucketConfigType): S3ClientT { return error } - return await Storage.get(filename) + return await Storage.get(filename, { expires: 3600 }) }, } }