|
|
@ -224,13 +224,7 @@ namespace DSWeb.Areas.TruckMng.Controllers
|
|
|
|
Directory.CreateDirectory(dirPath);
|
|
|
|
Directory.CreateDirectory(dirPath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String fileExt = Path.GetExtension(imgFile.FileName).ToLower();
|
|
|
|
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 newFileName = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + fileExt;
|
|
|
|
String filePath = dirPath + newFileName;
|
|
|
|
String filePath = dirPath + newFileName;
|
|
|
|