code: @RequestMapping(value = "/upload.action", method = RequestMethod.POST)
      public ResponseEntity<?> uploadFile(
          @RequestParam("file") MultipartFile uploadedFile) {
  
          LOG.debug("Requested to upload a multipart-file");
  
          // build response map
          Map<String, Object> responseMap = new HashMap<String, Object>();
          try {
              E file = service.uploadFile(uploadedFile);
              LOG.info("Successfully uploaded file " + file.getFileName());
              responseMap = ResultSet.success(file);
          } catch (Exception e) {
              LOG.error("Could not upload the file: " + e.getMessage());
              responseMap = ResultSet.error("Could not upload the file: " +
                  e.getMessage());
          }
  
          final HttpHeaders responseHeaders = new HttpHeaders();
          responseHeaders.setContentType(MediaType.APPLICATION_JSON_UTF8);
  
          // rewrite the response-Map as String
          return new ResponseEntity<>(responseMap, responseHeaders, HttpStatus.OK);
      }
docs: Persists a file as bytearray in the database
  
  @param uploadedFile