I have the following form on an .NET MVC View:
<form method="post" enctype="multipart/form-data" action="/Video/UploadDocument">
<input type="file" id="document1" name="document1"/>
<input type="submit" value="Save"/>
</form>
And the controller has the following signature that gets called:
public ActionResult UploadDocument(HttpPostedFileBase file) {
return View();
}
When I break inside the UploadDocument method, the parameter 'file' is null. I've selected a valid document on my desktop and know it contains text. What am I missing to get this file upload working?