public ActionResult Save(MemberM model, IFormFile Member_Photo_Files, IFormFile Member_FilePath_Fiels) { //接收图片 if (Member_Photo_Files != null) { this.HandleUpFile(Member_Photo_Files, new string[] { ".jpg", ".gif", ".png" }, _WebRootPath, null, (_Path) => { model.Member_Photo = _Path; }); } //接收文件 if (Member_FilePath_Fiels != null) { this.HandleUpFile(Member_FilePath_Fiels, null, _WebRootPath, null, (_Path) => { model.Member_FilePath = _Path; }); } //判断是否有文件上传上来 //if (Member_Photo_Files.Count > 0) //{ // foreach (var item in Member_Photo_Files) // { // this.HandleUpFile(item, new string[] { ".jpg", ".gif", ".png" }, _WebRootPath, null, (_Path) => // { // model.Member_Photo = _Path; // }); // } //} this.KeyID = _MemberBL.Save(model); return(Json(new { status = 1, ID = KeyID })); }