hanxuntao 1 week ago
parent 8963ea5106
commit 2d2bacb65a

@ -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;

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>D:\DS7_QDHHYT\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\DONGSHENG7\DS7HHYT\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />

Loading…
Cancel
Save