From 2d2bacb65a252525043cba8f6de2088854433820 Mon Sep 17 00:00:00 2001 From: hanxuntao Date: Fri, 6 Dec 2024 12:37:15 +0800 Subject: [PATCH] 1 --- DSWeb/Areas/TruckMng/Controllers/MsWlTruckController.cs | 8 +------- DSWeb/DSWeb.csproj.user | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/DSWeb/Areas/TruckMng/Controllers/MsWlTruckController.cs b/DSWeb/Areas/TruckMng/Controllers/MsWlTruckController.cs index 4a8ddfaf..81c82997 100644 --- a/DSWeb/Areas/TruckMng/Controllers/MsWlTruckController.cs +++ b/DSWeb/Areas/TruckMng/Controllers/MsWlTruckController.cs @@ -224,13 +224,7 @@ namespace DSWeb.Areas.TruckMng.Controllers Directory.CreateDirectory(dirPath); } String fileExt = Path.GetExtension(imgFile.FileName).ToLower(); - string ext = Path.GetExtension(imgFile.FileName).ToLower(); - if (ext == ".asp" || ext == ".aspx") - { - jsonRespose.Success = false; - jsonRespose.Message = "不允许上传ASP或ASPX文件"; - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; - } + String newFileName = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + fileExt; String filePath = dirPath + newFileName; diff --git a/DSWeb/DSWeb.csproj.user b/DSWeb/DSWeb.csproj.user index 99c7c0d3..2ea1f905 100644 --- a/DSWeb/DSWeb.csproj.user +++ b/DSWeb/DSWeb.csproj.user @@ -2,7 +2,7 @@ ShowAllFiles - D:\DS7_QDHHYT\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml + D:\DONGSHENG7\DS7HHYT\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml true Debug|Any CPU