Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EFWMExternalRestSecurity
- @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
- @ApiOperation(value = "carico File", notes = "Carico File")
- public @ResponseBody ResponseEntity<Object> uploadFile(@ModelAttribute MultipartFile file) {
- System.out.println("- Here you are in the controller -");
- MessageResponseEntity entity = null;
- ResponseEntity<Object> responseEntity = null;
- try {
- entity = new MessageResponseEntity();
- storageService.save(file);
- responseEntity = createHttp200OkResponseEntity(entity);
- } catch (final EFWMException e) {
- responseEntity = createHttp200ServerErrorRsponse(entity, e);
- } catch (final Exception e) {
- responseEntity = createHttp500ServerErrorRsponse(e);
- }
- return responseEntity;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement