public async Task <IActionResult> UploadSalesOrder(IFormFile file) { if (file != null || file.Length > 0) { using (var ms = new MemoryStream()) { file.CopyTo(ms); ms.Seek(0, SeekOrigin.Begin); var response = await _applicationServices.UploadSalesOrderAsync(ms); if (response != null) { return(Ok(response)); } } } return(null); //var noResponseFile = GetNoResponseFile(); //return new FileStreamResult(noResponseFile, "text/plain") { FileDownloadName = "noresponse.txt" }; }