Given this model, is it possible to use the Html.EditorFor() to render a file upload input element to the page? I played around with the Datatype of the property FileName,
Here's an example for MVC 5 (required for the htmlAttributes).
Create this as a file called HttpPostedFileBase.cshtml under ~\Views\Shared\EditorTemplates
@model HttpPostedFileBase
@{
var htmlAttributes = HtmlHelper.AnonymousObjectToHtmlAttributes(ViewData["htmlAttributes"]);
htmlAttributes["type"] = "file";
}
@Html.TextBoxFor(model => model, htmlAttributes)
This generates the control with the correct id and name and works when editing collections from a model EditorFor template.