이미지 수신
This commit is contained in:
@@ -1,18 +1,20 @@
|
|||||||
package site.ocr.prd.contorllers;
|
package site.ocr.prd.contorllers;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
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.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class ImgController {
|
public class ImgController {
|
||||||
|
|
||||||
@PostMapping("img/get-ocr")
|
@PostMapping("img/get-img")
|
||||||
public String postGetImgOcr(@RequestBody String entity) {
|
public void postGetImg(@RequestPart("image") MultipartFile image) {
|
||||||
//TODO: process POST request
|
image.getResource();
|
||||||
|
System.out.println("image :: " + image.getResource().getFilename());
|
||||||
return entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user