Your problem is that you are creating a send request with information that the middleware can associate because the naming convention is incorrect.
you see, you have 4 file fields, each of which has a different name, so that binding to them correctly binds them, your signature of the controller action should look like this:
public ActionResult Create(HttpPostedFileBase mgmFile, HttpPostedFileBase logoFile, HttpPostedFileBase fohFile , HttpPostedFileBase bohFile)
Following the MCV design pattern, the best option would be to use a ViewModel that contains IEnumerable<HttpPostedFileBase> and you create a custom editor template for IEnumerable<HttpPostedFileBase>
so you can use it like this:
Html.EditorFor(m=>Model.filesUploaded)
and the action of your controller will look like this:
public ActionResult Create(MyViewModel i_InputModel) { i_InputModel.filesUploade;
Other options: Use the HTML5 multiple attribute in the file input field as follows:
<label for="mgmFile" class="col-sm-2 control-label">Files:</label> <div class="col-sm-6"> <input type="file" multiple="multiple" name="files" id="files" /> </div>
and controller actions as follows:
public ActionResult Create(HttpPostedFileBase files)
or use several file fields, but index them by name:
<input type="file" multiple="multiple" name="files[0]" id="files_1" /> <input type="file" multiple="multiple" name="files[1]" id="files_2" /> <input type="file" multiple="multiple" name="files[2]" id="files_3" /> <input type="file" multiple="multiple" name="files[3]" id="files_4" />
and then you can use the controller action as follows:
public ActionResult Create(IEnumerable<HttpPostedFileBase> files)