public ActionResult Download(string name) { try { var result = _imagesManager.Get(name); if (result == null) { return(NotFound()); } return(result); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Error downloading image")); } }