Skip to content

Commit

Permalink
Change file url expires to 1 hour.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLin0991 committed Aug 1, 2023
1 parent debeb2c commit 4741253
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/app-web/src/s3/s3Amplify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function newAmplifyS3Client(bucketConfig: S3BucketConfigType): S3ClientT {
): Promise<string> => {
const result = await Storage.get(key, {
bucket: bucketConfig[bucket],
expires: 3600,
})
if (typeof result === 'string') {
return result
Expand Down Expand Up @@ -189,7 +190,7 @@ function newAmplifyS3Client(bucketConfig: S3BucketConfigType): S3ClientT {
return error
}

return await Storage.get(filename)
return await Storage.get(filename, { expires: 3600 })
},
}
}
Expand Down

0 comments on commit 4741253

Please sign in to comment.