diff --git a/app/api/missions/image/[...path]/route.ts b/app/api/missions/image/[...path]/route.ts index ccd482d2..6ade181d 100644 --- a/app/api/missions/image/[...path]/route.ts +++ b/app/api/missions/image/[...path]/route.ts @@ -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:', {