|
|
|
@ -197,6 +197,16 @@ namespace DSWeb.Areas.TruckMng.Controllers
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string name = Request.Files[0].FileName;
|
|
|
|
|
string ext = Path.GetExtension(name).ToLower();
|
|
|
|
|
string[] allowExt = new string[] { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".pdf" };
|
|
|
|
|
if (!allowExt.Contains(ext))
|
|
|
|
|
{
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
result.SetErrorInfo("不允许上传此类文件");
|
|
|
|
|
return BasicDataRefDAL.GetContentResult(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var imgFile = Request.Files["file"];
|
|
|
|
|
var truckNo = Request.Form["TruckNo"].ToString().Trim();
|
|
|
|
|
var Cert_Type = Request.Form["Cert_Type"].ToString().Trim();
|
|
|
|
|