public async Task <IActionResult> PostImageToWord([FromRoute] string contentType, int contentId, string hotLink = null) { var findImage = _context.Images.Where(x => x.ContentId == contentId && x.ContentType == contentType).FirstOrDefault(); if (!string.IsNullOrEmpty(hotLink)) { CreateImageFromHotlink(contentType, contentId, hotLink, findImage); } else { var filesUploaded = HttpContext.Request.Form.Files; if (filesUploaded != null) { var imageLogic = new ImageLogic(); imageLogic.CreateImage(contentType, contentId, filesUploaded, findImage); } } return(Ok()); }