Learn MVC Using Angular File Upload


This article demonstrates learning MVC using Angular File Upload and Bootstrap Filestyle in Visual Studio 2017.

Angular File Upload

Angular File Upload supports native Html5 uploads. It works with any server side platform which supports standard HTML form uploads. When a file is added to the queue, it creates a file item and uploader options are into this object. After, the items in the queue are ready for uploading.


  • Drag-n-drop upload.
  • Upload progress.
  • Validation file filter.
  • File upload queue.

Below are the steps that allow you to use Angular File Upload in Angular JS and MVC.

  • Create an MVC Project.
  • Configure Angular File Upload and Bootstrap Filestyle.
  • Work in Angular File Upload.

Create an MVC Project

Open Visual Studio 2017.


Go to New menu >Click New and Project. Now it will open the New Project Window.


You can select ASP.NET Web Application on Framework 4.5. Enter the name of the project in tje “Solution name” text box and then click OK.


One more window should appear. Select MVC Template in this pop-up and click OK. Now start cropping your image.

Configure Angular File Upload and Bootstrap Filestyle

Right click on the project and go to the NuGet package manager. Then search ‘angularfileupload’ in the Browse tab and install it.


OR you can download the plugins from here:

Open the _Layout.cshtml and refer the.js file from the downloaded folder to this view page.

Link your Angular configurable file here, using whatever name you gave it.

Angular Module

You will need to include the module as a dependency in your application.

Work in Angular Image Upload

Using a Bootstrap Filestyle directive, create a single uploading attribute.


Angular Controller

Initiate the Fileuploader as an object. This object will load the predefined function.

Angular Directive

You can use Bootstrap Filestyle as an Angular directive. When you select the image using Filestyle, set the element using the <img-crop> directive.

Click the F5 button and run the application. Now it will appear in the browser and you can see the result.

Output 1


When you selected or dropped one or more filters into the component, and these filters are then applied. Files which pass all filters are added to the queue.

Output 2


This creates instance uploaders which are copied into the object.

Output 3


Image queue is ready to upload the selected image.


In this article, we have learned about MVC using Angular File Upload and Bootstrap File Style. If you have any queries, please tell me through the comments section, because your comments are very valuable.

Happy Coding!

Thiruppathi Rengasamy
I'm a Dotnet Developer & Blogger. And also I'm working as a senior software engineer. I would like to spend my precious time writing articles, research on .Net technologies, and learning new technologies.