fix: S3 expiry not passed correctly (#8013)

This commit is contained in:
Tom Moor authored and GitHub committed 2024-11-24 06:15:19 -08:00
1 parent 0663d191fc
commit 2cce95488c
1 file changed
+1 -2
+1 -2
View File
@@ -145,14 +145,13 @@ export default class S3Storage extends BaseStorage {
const params = {
Bucket: this.getBucket(),
Key: key,
Expires: expiresIn,
};
if (isDocker) {
return `${this.getPublicEndpoint()}/${key}`;
} else {
const command = new GetObjectCommand(params);
const url = await getSignedUrl(this.client, command);
const url = await getSignedUrl(this.client, command, { expiresIn });
if (env.AWS_S3_ACCELERATE_URL) {
return url.replace(