public async Task <ActionResult> Post() { // Read the image from the POSTed data stream, into a byte array byte[] imageBytes; using (var ms = new MemoryStream(2048)) { await Request.Body.CopyToAsync(ms); imageBytes = ms.ToArray(); } try { List <string> listVerifiedPhoneNumbers = await _mediatorService.ProcessPhoneNumber(imageBytes); return(Ok(string.Join(" - ", listVerifiedPhoneNumbers))); } catch { return(StatusCode(500)); } }