W n8n attention vm
This commit is contained in:
parent
6d226f7dd7
commit
57df86af2c
@ -42,6 +42,11 @@ export async function GET(
|
||||
try {
|
||||
const response = await s3Client.send(command);
|
||||
if (!response.Body) {
|
||||
console.error('File not found in Minio:', {
|
||||
path: filePath,
|
||||
minioPath,
|
||||
bucket: process.env.MINIO_AWS_S3_UPLOAD_BUCKET_NAME || 'pages'
|
||||
});
|
||||
return new NextResponse('File not found', { status: 404 });
|
||||
}
|
||||
|
||||
@ -53,7 +58,12 @@ export async function GET(
|
||||
|
||||
return new NextResponse(response.Body as any, { headers });
|
||||
} catch (error) {
|
||||
console.error('Error fetching file from Minio:', error);
|
||||
console.error('Error fetching file from Minio:', {
|
||||
error,
|
||||
path: filePath,
|
||||
minioPath,
|
||||
bucket: process.env.MINIO_AWS_S3_UPLOAD_BUCKET_NAME || 'pages'
|
||||
});
|
||||
if (error instanceof NoSuchKey) {
|
||||
return new NextResponse('File not found', { status: 404 });
|
||||
}
|
||||
|
||||
@ -203,7 +203,12 @@ export default function MissionTabDetailPage() {
|
||||
alt={mission.name}
|
||||
className="w-full h-full object-cover rounded-md"
|
||||
onError={(e) => {
|
||||
console.log("Logo failed to load:", mission.logoUrl);
|
||||
console.error("Logo failed to load:", {
|
||||
missionId: mission.id,
|
||||
missionName: mission.name,
|
||||
logoUrl: mission.logoUrl,
|
||||
logoPath: mission.logo
|
||||
});
|
||||
// Show placeholder on error
|
||||
(e.currentTarget as HTMLImageElement).style.display = 'none';
|
||||
const parent = e.currentTarget.parentElement;
|
||||
|
||||
@ -23,6 +23,7 @@ interface Mission {
|
||||
id: string;
|
||||
name: string;
|
||||
logo?: string;
|
||||
logoUrl?: string;
|
||||
oddScope: string[];
|
||||
niveau: string;
|
||||
missionType: string;
|
||||
@ -188,14 +189,18 @@ export default function MissionTabPage() {
|
||||
{/* Centered Logo */}
|
||||
<div className="flex justify-center items-center p-6 flex-grow">
|
||||
<div className="w-48 h-48 relative">
|
||||
{mission.logo ? (
|
||||
{mission.logoUrl ? (
|
||||
<img
|
||||
src={mission.logo || ''}
|
||||
src={mission.logoUrl}
|
||||
alt={mission.name}
|
||||
className="w-full h-full object-cover rounded-md"
|
||||
onError={(e) => {
|
||||
console.log("Logo failed to load:", mission.logo);
|
||||
console.log("Full URL attempted:", mission.logo);
|
||||
console.error("Logo failed to load:", {
|
||||
missionId: mission.id,
|
||||
missionName: mission.name,
|
||||
logoUrl: mission.logoUrl,
|
||||
logoPath: mission.logo
|
||||
});
|
||||
// If the image fails to load, show the fallback
|
||||
(e.currentTarget as HTMLImageElement).style.display = 'none';
|
||||
// Show the fallback div
|
||||
|
||||
@ -227,7 +227,12 @@ export default function MissionDetailPage() {
|
||||
alt={mission.name}
|
||||
className="w-full h-full object-cover rounded-md"
|
||||
onError={(e) => {
|
||||
console.log("Logo failed to load:", mission.logoUrl);
|
||||
console.error("Logo failed to load:", {
|
||||
missionId: mission.id,
|
||||
missionName: mission.name,
|
||||
logoUrl: mission.logoUrl,
|
||||
logoPath: mission.logo
|
||||
});
|
||||
// Show placeholder on error
|
||||
(e.currentTarget as HTMLImageElement).style.display = 'none';
|
||||
const parent = e.currentTarget.parentElement;
|
||||
|
||||
@ -229,8 +229,12 @@ export default function MissionsPage() {
|
||||
alt={mission.name}
|
||||
className="w-full h-full object-cover rounded-md"
|
||||
onError={(e) => {
|
||||
console.log("Logo failed to load:", mission.logoUrl);
|
||||
console.log("Full URL attempted:", mission.logoUrl);
|
||||
console.error("Logo failed to load:", {
|
||||
missionId: mission.id,
|
||||
missionName: mission.name,
|
||||
logoUrl: mission.logoUrl,
|
||||
logoPath: mission.logo
|
||||
});
|
||||
// If the image fails to load, show the fallback
|
||||
(e.currentTarget as HTMLImageElement).style.display = 'none';
|
||||
// Show the fallback div
|
||||
|
||||
Loading…
Reference in New Issue
Block a user