From e54c219b760f238763bbaea230bf9fecaec64e83 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 28 Jan 2026 19:15:49 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=88=98?= =?UTF-8?q?=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/site/ocr/prd/contorllers/ImgController.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/prd/src/main/java/site/ocr/prd/contorllers/ImgController.java b/prd/src/main/java/site/ocr/prd/contorllers/ImgController.java index 4bc8900..be82047 100644 --- a/prd/src/main/java/site/ocr/prd/contorllers/ImgController.java +++ b/prd/src/main/java/site/ocr/prd/contorllers/ImgController.java @@ -1,18 +1,20 @@ package site.ocr.prd.contorllers; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestPart; @RestController public class ImgController { - @PostMapping("img/get-ocr") - public String postGetImgOcr(@RequestBody String entity) { - //TODO: process POST request - - return entity; + @PostMapping("img/get-img") + public void postGetImg(@RequestPart("image") MultipartFile image) { + image.getResource(); + System.out.println("image :: " + image.getResource().getFilename()); } }