Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions ui/src/app/api/img/delete/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export async function POST(request: Request) {
return NextResponse.json({ error: 'Invalid image path' }, { status: 400 });
}

// make sure it is an image
if (!/\.(jpg|jpeg|png|bmp|gif|tiff|webp)$/i.test(imgPath.toLowerCase())) {
return NextResponse.json({ error: 'Not an image' }, { status: 400 });
}

// if img doesnt exist, ignore
if (!fs.existsSync(imgPath)) {
return NextResponse.json({ success: true });
Expand Down