From 6487268bb7b60a01ba174750c578b02c66afeac6 Mon Sep 17 00:00:00 2001 From: ilovemoon Date: Thu, 31 Oct 2024 21:43:54 +0530 Subject: [PATCH] fix: cloudinary res secure_url (#171) --- app/api/cloudinary/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/cloudinary/route.ts b/app/api/cloudinary/route.ts index ca9fa6f..038502f 100644 --- a/app/api/cloudinary/route.ts +++ b/app/api/cloudinary/route.ts @@ -17,7 +17,7 @@ export async function POST(req: Request) { const uploadRes = await cloudinary.uploader.upload(base64Image); - return NextResponse.json({ url: uploadRes.url }); + return NextResponse.json({ url: uploadRes.secure_url }); } catch (error) { if (error instanceof Error) return NextResponse.json({ message: error.message }, { status: 500 });