이미지 수신
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user