public ActionResult DocX_ExportImgDocx() { byte[] objFile = DocXService.AddImgDoc("https://github.com/felixhuang72/Sample_ExportToDocx/raw/master/MarkdownAttach/iis_officedom_01.png"); if (objFile != null && objFile.Length > 0) { return(File(objFile, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", $"docx_test_{DateTime.Now.ToString("yyyyMMddHHmmss")}.docx")); } else { return(RedirectToAction("Index")); } }