(key: string, expiresIn = 3600)
| 139 | * @returns Presigned URL |
| 140 | */ |
| 141 | export async function getPresignedUrl(key: string, expiresIn = 3600) { |
| 142 | const command = new GetObjectCommand({ |
| 143 | Bucket: S3_CONFIG.bucket, |
| 144 | Key: key, |
| 145 | }) |
| 146 | |
| 147 | return getSignedUrl(getS3Client(), command, { expiresIn }) |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Generate a presigned URL for direct file access with custom bucket |
no test coverage detected