I have
[HttpPost]
public ActionResult GetFiles(HttpPostedFileBase file)
{
if (file != null && file.ContentLength > 0)
{
var fileName = Path.GetFileName(file.FileName);
var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName);
file.SaveAs(path);
}
return Json("Uploaded " + Request.Files.Count + " files",JsonRequestBehavior.AllowGet);
}
Now I want to upload files in Ajax and save files another folder. How to get files from input form and send it via Ajax?