Introduction
This article demonstrates MVC using angular file upload using bootstrap file style 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 file is added to the queue, it creates file item and uploader options are into this object. After, the items in the queue are ready for uploading.
Features
- Drag-n-drop upload
- Upload progress
- Validation file filter
- File upload queue
Follow the steps you can use angular file upload in angular JS in MVC
- Create MVC Project
- Configure Angular file upload & Bootstrap filestyle
- Work in Angular file upload
Create MVC Project
Open the visual studio 2017

Go to New menu >Click New & project. Now it will open New Project Window

You can select ASP.NET Web Application on Framework 4.5. Enter the name of project in “Solution name” textbox then click ok button.

One more window should be appearing. Select MVC Template in this popup & Click ok button. Now start cropping image.
Configure Angular File Upload & Bootstrap Filestyle
Right click above the project and go to the NuGet package manager then search ‘angularfileupload’ in browse tab & install it.

OR You can download the plug in from
Open the _Layout.cshtml and must refer the .js file from downloaded folder to this view page
- <script src="~/Plugin/angular/angular.min.js"></script>
- <script src="~/Plugin/angular-ui-router/release/angular-ui-router.min.js"></script>
- <script src="~/Plugin/angular-file-upload/dist/angular-file-upload.min.js"></script>
- <script src="~/Plugin/bootstrap-filestyle/src/bootstrap-filestyle.js"></script>
Link your angular configurable file, whatever you give as the name
- <script src="~/App/App.module.js"></script>
- <script src="~/App/App.config.js"></script>
- <script src="~/App/IUController.js"></script>
Angular Module
You will need to include the module as a dependency on your application.
- var uiroute = angular
- .module('uiroute', ['ui.router','angularFileUpload']);
If you have any doubts in configuration, visit my articles,
- Learn Basics Of MVC Using AngularJS
- Learn MVC Using Angular UI-Route
- Learn MVC Using Angular Role Based Login
- Learn MVC Using Angular Datatable
- Learn MVC Using Angular Crystal Report
- Learn MVC Using Angular Pie Chart
- Learn MVC Using Angular Flot Chart
- Learn MVC Using Angular xEditable
- Learn MVC Using Angular Idle
- Learn MVC Using Angular Wizard
- Learn MVC Using Angular - Maps
- Learn MVC Using Angular Bootstrap Nav Tree
- Learn MVC Using Angular Image Crop
Work in Angular image Upload
Using bootstrap file style directive make it as a single uploading attribute. Based on attribute you can set
- <input filestyle="" type="file" data-icon-name="icon-upload" data-button-text="Single" data-class-button="btn btn-default" data-classinput="form-control inline" nv-file-select="" uploader="uploader" class="form-control" />
Html Code




Prakash SFDCPosted Nov 20, 2019, 1:04 PM
How to download code??????????????????????????
clifford kwadwo owusu yeboahPosted Apr 15, 2018, 2:31 PM
How can i receive the file on server side. I get an error of "cannot find file....".
Klent DiamondPosted Jan 14, 2018, 9:11 PM
How to upload files to folder in asp mvc controller?
Raj KumarPosted Jun 25, 2017, 8:14 PM
Good article ... keep it up.
Vignesh ManiPosted Jun 23, 2017, 5:14 AM
Good article Bro. Thanks for sharing..