public HttpResponseMessage Post([FromBody] InfoVuln infoVuln) { //var res = new HttpResponseMessage(System.Net.HttpStatusCode.OK); try { helper.MainProcess(infoVuln); //string path = $"{CurrentDirectory}Renders/{helper.timeStamp}.Report.docx"; //ITemplateDocument docc = Configuration.Factory.Open(path); //docc.Process(infoVuln); //string filename = $"{helper.CurrentDirectory}/Renders/{helper.timeStamp}.Report.docx"; //var filebytes = System.IO.File.ReadAllBytes(filename); //var filememoryStream = new MemoryStream(filebytes); //res.Content = new StreamContent(filememoryStream); //var header = res.Content.Headers; //header.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment"); //header.ContentDisposition.FileName = filename; //header.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/docx"); //header.ContentLength = filememoryStream.Length; //return res; //DeleteDir(); return(IsExistFile($"{helper.timeStamp}.Report.docx")); } catch (Exception ex) { Console.WriteLine(ex.Message); return(new HttpResponseMessage() { StatusCode = System.Net.HttpStatusCode.NotFound }); } }