So, I was wondering if its ok to have something like this in the Controller (for each field that may need it):
if(!formFile.getContentType().startsWith("image/")){
bindingResult.rejectValue("formFile","MultipartInvalidFile");
return "fileForm";
Or is this should be handle in the service.class and then send to the controller?:
AwesomeService.class:
if(!formFile.getContentType().startsWith("image/")){
throw new exception... (and somehow send it to the controller->view?)
ps: all its example code, sorry if there are syntax errors