Image upload to server directory with post method
// very good sample https://github.com/jitendraselvam/ImageUpload/tree/master/ImageUploader
// put in the controller
[HttpPost]
public ActionResult Index(HttpPostedFileBase kep)
{
if(kep != null)
{
string content = Server.MapPath("/Content");
kep.SaveAs(System.IO.Path.Combine(content, "kep.jpg"));
}
return RedirectToAction("Index");
}
Comments