fix: Ajouter valeur par défaut pour AWS_S3_BUCKET_NAME dans route download
This commit is contained in:
parent
1954d90255
commit
39fea18d9e
1 changed files with 3 additions and 2 deletions
|
|
@ -36,12 +36,13 @@ export async function GET(request: NextRequest) {
|
|||
}
|
||||
|
||||
// Télécharger le fichier depuis S3
|
||||
const bucketName = process.env.AWS_S3_BUCKET_NAME || "odentas-docs"
|
||||
const command = new GetObjectCommand({
|
||||
Bucket: process.env.AWS_S3_BUCKET_NAME || '',
|
||||
Bucket: bucketName,
|
||||
Key: path,
|
||||
})
|
||||
|
||||
console.log('📥 Download API - Fetching from S3, bucket:', process.env.AWS_S3_BUCKET_NAME, 'key:', path)
|
||||
console.log('📥 Download API - Fetching from S3, bucket:', bucketName, 'key:', path)
|
||||
|
||||
const response = await s3Client.send(command)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue