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