[Solved] Post a image usining binairy and other data


figured it out,
set image as binary in model

@RequestMapping(value = "/update", method = RequestMethod.POST, consumes = "multipart/form-data")
    public ResponseEntity<Payee> update(@RequestPart("payee") @Valid Payee payee, @RequestPart("file") @Valid MultipartFile image) throws IOException
    {
        // routine to update a payee including image
        if (image != null)
            payee.setImage(new Binary(BsonBinarySubType.BINARY, image.getBytes()));
        Payee result = payeeRepository.save(payee);
        return ResponseEntity.ok().body(result);
    }

solved Post a image usining binairy and other data