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