W n8n attention vm

This commit is contained in:
alma 2025-05-24 18:32:07 +02:00
parent 7b9224d214
commit 5e7def4991

View File

@ -34,11 +34,12 @@ export async function GET(
segments: pathSegments segments: pathSegments
}); });
// Use the path as is, since n8n already includes the missions/ prefix // Remove any duplicate missions/ prefix
const minioPath = filePath; const minioPath = filePath.replace(/^missions\/missions\//, 'missions/');
console.log('Full Minio path:', { console.log('Full Minio path:', {
minioPath, minioPath,
bucket: 'missions' bucket: 'missions',
endpoint: process.env.MINIO_S3_UPLOAD_BUCKET_URL
}); });
const command = new GetObjectCommand({ const command = new GetObjectCommand({
@ -71,6 +72,7 @@ export async function GET(
path: filePath, path: filePath,
minioPath, minioPath,
bucket: 'missions', bucket: 'missions',
endpoint: process.env.MINIO_S3_UPLOAD_BUCKET_URL,
errorType: error instanceof NoSuchKey ? 'NoSuchKey' : 'Unknown' errorType: error instanceof NoSuchKey ? 'NoSuchKey' : 'Unknown'
}); });
if (error instanceof NoSuchKey) { if (error instanceof NoSuchKey) {