I try to upload/stream a large image to a REST controller that takes the file and stores it in to a database.
@Controller
@RequestMapping(\"/api/member/pictu
If you want do deal with the request body as an InputStream you can get it directly from the Request.
@Controller
@RequestMapping("/api/member/picture")
public class MemberPictureResourceController {
@RequestMapping(value = "", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void addMemberPictureResource(HttpServletRequest request) {
try {
InputStream is = request.getInputStream();
// Process and Store image in database
} catch (IOException e) {
// handle exception
}
}
}