From 1c1a4383e15d2b8fce4908f39cce1c0ba3745088 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 28 Jan 2026 19:14:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=9C=EB=B2=84=EC=97=90=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=A0=84=EC=86=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/ImgInputForm.client.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/app/components/ImgInputForm.client.tsx b/src/app/components/ImgInputForm.client.tsx index 96f27ce..7917fb5 100644 --- a/src/app/components/ImgInputForm.client.tsx +++ b/src/app/components/ImgInputForm.client.tsx @@ -29,15 +29,26 @@ const ImgInputForm_client = () => { if (file) file.click() } - const confirm = () => { - + const confirm = async () => { + const files = fileRef.current?.files + if (files) { + const file = files[0] + const fomrData = new FormData() + fomrData.append("image", file) + console.log("here") + console.log(file.size) + await fetch("http://localhost:9001/img/get-img", { + method: "POST", + body: fomrData + }) + } } return ( <> -
+
{ preview && - + }