public SaveFileResult ReplaceOpenXML([FromBody] dynamic content) { var pdf = new PDF(); var serverAddr = $"{this.Request.Scheme}://{this.Request.Host}{this.Request.PathBase}/"; var targetPdfName = pdf.CreatePDFReport(content, serverAddr); var returnResponse = new SaveFileResult(); returnResponse.FileName = targetPdfName; ReportUtils reportUtils = new ReportUtils(); reportUtils.DeleteOldFiles(); return(returnResponse); }