W n8n attention vm

This commit is contained in:
alma 2025-05-24 18:46:12 +02:00
parent 96846f0249
commit 9e57d512e5

View File

@ -60,11 +60,21 @@ export async function GET(
}
// Set appropriate content type and cache control
const contentType = response.ContentType || 'application/octet-stream';
const contentType = response.ContentType || 'image/png'; // Default to image/png if not specified
const headers = new Headers();
headers.set('Content-Type', contentType);
headers.set('Cache-Control', 'public, max-age=31536000');
// Log the response details
console.log('Serving image:', {
path: filePath,
minioPath,
contentType,
contentLength: response.ContentLength,
lastModified: response.LastModified,
etag: response.ETag
});
return new NextResponse(response.Body as any, { headers });
} catch (error) {
console.error('Error fetching file from Minio:', {