( key: string, customConfig: S3Config, expiresIn = 3600 )
| 155 | * @returns Presigned URL |
| 156 | */ |
| 157 | export async function getPresignedUrlWithConfig( |
| 158 | key: string, |
| 159 | customConfig: S3Config, |
| 160 | expiresIn = 3600 |
| 161 | ) { |
| 162 | const command = new GetObjectCommand({ |
| 163 | Bucket: customConfig.bucket, |
| 164 | Key: key, |
| 165 | }) |
| 166 | |
| 167 | return getSignedUrl(getS3Client(), command, { expiresIn }) |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * Download a file from S3 |
no test coverage detected