2
0

feat(bot): ️ Increase upload expiry time

This commit is contained in:
Baptiste Arnaud
2022-07-02 08:37:35 +02:00
parent 9cddc755a3
commit 066147f81d

View File

@@ -7,7 +7,7 @@ type GeneratePresignedUrlProps = {
} }
const tenMB = 10 * 1024 * 1024 const tenMB = 10 * 1024 * 1024
const oneHundredAndTwentySeconds = 120 const tenMinutes = 10 * 60
export const generatePresignedUrl = ({ export const generatePresignedUrl = ({
filePath, filePath,
@@ -46,7 +46,7 @@ export const generatePresignedUrl = ({
key: filePath, key: filePath,
'Content-Type': fileType, 'Content-Type': fileType,
}, },
Expires: oneHundredAndTwentySeconds, Expires: tenMinutes,
Conditions: [['content-length-range', 0, sizeLimit]], Conditions: [['content-length-range', 0, sizeLimit]],
}) })
return presignedUrl return presignedUrl