Postman (1) 썸네일형 리스트형 [Spring Boot] 파일 업로드 구현(MultipartFile) + Postman을 이용한 파일 업로드 테스트 ■ 목표 - 스프링부트 프로젝트에서 Multipart File을 이용한 파일 업로드 구현. - 로컬에서 Postman을 이용한 테스트. 1. 컨트롤러에 아래의 함수를 생성한다. (내부 로직, Return값 등은 알아서 수정하기) @PostMapping("/upload") public ResponseEntity upload(@RequestPart MultipartFile file) { String originalFileName = file.getOriginalFilename(); File destination = new File("upload/dir" + originalFileName); try { file.transferTo(destination); } catch (IOException e) { retu.. 이전 1 다음