---
title: "Multiple File upload in ASP.NET MVC"
published_at: "2009-05-13T03:46:00+00:00"
modified_at: "2026-06-10T07:46:22+00:00"
url: "https://www.syncfusion.com/blogs/post/file-upload-in-asp-net-mvc"
excerpt: "Download file Sample Project Uploading several files is nice and clean with the help of the FileCollectionModelBinder available in the ASP.NET MVC futures assembly. Please follow the procedure below to create a sample. Add a form to your view with..."
taxonomy_category:
  - "ASP.NET MVC"
taxonomy_post_tag:
  - "ASP.NET MVC"
  - "FileUpload"
---

# Multiple File upload in ASP.NET MVC

[Daniel Jebaraj](https://www.syncfusion.com/blogs/author/danielj)

![Image](https://www.syncfusion.com/blogs/wp-content/uploads/2018/08/multiple_file_upload_4e5fa13a.png)


Download file [Sample Project](https://blog.syncfusion.com/wp-content/uploads/2018/10/basic.zip)

Uploading several files is nice and clean with the help of the FileCollectionModelBinder available in the ASP.NET MVC futures assembly. Please follow the procedure below to create a sample.

- Add a form to your view with the settings below (you can use the ASP.NET MVC form helpers too to arrive at the same result).

```
<form method="post" enctype="multipart/form-data" action="/home/uploadfiles">
<div>
<input type="file" name="fileName" id="fileName" accept="file/zip" />
<input type="file" name="fileName" id="file3" accept="file/zip" />
<%=Html.ValidationMessage("fileName") %>
</div>
<div>
<input type="submit" value="Upload file"/>
</div>
</form>
```

- Add a reference to the ASP.NET MVC futures assembly. This is available from the ASP.NET MVC project on CodePlex – [direct link](http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471#DownloadId=61773) .
- In your global.asax file, add a call to FileCollectionModelBinder.RegisterBinder( as shown below

```
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
FileCollectionModelBinder.RegisterBinder(ModelBinders.Binders);
}
```

- Your controller code can then accept a parameter of type HttpPostedFileBase[] as shown below. Please note that the name of the argument to this method should match the **ID and Name** of the client-side file upload form element.

```
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UploadImage(HttpPostedFileBase[] files)
{
// process files here
}
```

A complete sample is available for download.

In order to upload one file at a time, you do not need the futures assembly. The built-in [HttpPostedFileBaseModelBinder](http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Web.Mvc:1.0.0.0:31bf3856ad364e35/System.Web.Mvc.HttpPostedFileBaseModelBinder)
 can handle this.
