public CommandProcessingResult saveOrUpdateClientImage(final Long clientId, final Base64EncodedImage encodedImage) {
final Client client = this.clientRepositoryWrapper.findOneWithNotFoundDetection(clientId);
deletePreviousClientImage(client);
final ContentRepository contenRepository = this.contentRepositoryFactory.getRepository();
final String imageLocation = contenRepository.saveImage(encodedImage, clientId, "image");
return updateClientImage(client, imageLocation, contenRepository.getStorageType());
}
@Transactional