I can see there are plenty of questions and resources about this but I just cant seem to see what I am doing wrong.
HTML Snippet
<form method="post" action="<%=Url.Action("Create", "Image") %>" enctype="mulitipart/form-data">
<input type="file" name="ImageFile" id="ImageFile" />
And here is the Controller code, none of the Console.Writeline
lines get hit:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(Image image, HttpPostedFileBase file)
{
if (file != null)
{
Console.WriteLine(file.FileName);
}
if (Request.Files.Count > 0)
{
Console.WriteLine("oh hai");
}
What am I doing wrong?