이미지 수신

This commit is contained in:
root
2026-01-28 19:15:49 +09:00
parent 8d9d75e372
commit e54c219b76

View File

@@ -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());
}
}