I have a form it's creating by script in jquery plugin like this.
elem.insertHtml('<form method="post" action="Home/ContactUs" enctype="mutlipart/form-data"><input type="file" name="file" id="fileUpload"></form></div>')
I must upload a file, and save it in some folder. When I choose a file, and submit form, on form subbmiting calling the ContactUs action.There is ContactUs action from Home controller.
public ActionResult ContactUs(HttpPostedFileBase file, ContactFormModel model)
{
//other code
}
But HttpPostedFileBase file is null, and I havn't got any notions why. Can you help me, please?
When I create my form usin Html.BeginForm, it works correctly, by but script there is a problem.