W n8n attention vm
This commit is contained in:
parent
96846f0249
commit
9e57d512e5
@ -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:', {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user