diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs index 8211c31b..2634937c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs @@ -807,6 +807,11 @@ namespace FineUIPro.Web.CQMS.Check foreach (string url in arrUrl) { var oneUrl = Server.MapPath("~/") + url; + bool exists = File.Exists(oneUrl); + if (!exists) + { + continue; + } byte[] bytes = System.IO.File.ReadAllBytes(oneUrl); int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG); @@ -837,6 +842,11 @@ namespace FineUIPro.Web.CQMS.Check foreach (string url in arrUrl) { var oneUrl = Server.MapPath("~/") + url; + bool exists = File.Exists(oneUrl); + if (!exists) + { + continue; + } byte[] bytes = System.IO.File.ReadAllBytes(oneUrl); int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG);