I have the following view model.
public class MyViewModel
{
[DataType(DataType.Upload)]
public HttpPostedFileBase ImageUpload { get; set; }
publ
How about getting rid of the HttpPostedFileBase from the model and adding it to the controller as a second parameter.
In your html, you would add:
In your controller you would do:
[HttpPost]
public ActionResult thisController(Model myModel, HttpPostedFileBase file)
{ }
This should automatically catch any file you input.