AngularJS Multiple File Upload example using Web API

AngularJS Multiple File Upload example using Web API

Also Read : first love marriage in the world

AngularJS Multiple File Upload example using Web API

In this Post We Will Explain About is AngularJS Multiple File Upload example using Web API With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to AngularJS Multiple File UploadExample

In this post we will show you Best way to implement AngularJS Upload Multiple Files to ASP.Net Web API, hear for ng-file-upload web apiwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

I am using simple XMLHttpRequest http protocol methods, in this example simple, to make calls to my web API. Therefore, please simple click the below link just and check the example Web API controller.

READ :  Angular Multiple File Upload with PHP MySQLi

Include Scripts and Modules

<script src=""></script>
var myApp = angular.module('liveApp', []);

HTML Markup Lanuage – index.html : Step By Step File Upload Example in AngularJS

<!DOCTYPE html>
  <title>Step By Step File Upload Example in AngularJS</title>
  <script src=""></script>

<body ng-app="liveApp">

    <div ng-controller="liveCtrl">
        <input type="file" id="file" name="file" multiple
            onchange="angular.element(this).scope().fileGetDetails(this)" />
        <input type="button" ng-click="uploadFiles()" value="Upload" />
        <p><progress id="myphoto" value="0"></progress></p>


File Upload Example in AngularJS : The Controller and the Scope

Also Read : tamilblasters, 9kmovie, filmygod, hdhub4u, vegamovies, tamilrockers website link and 1377x proxy.

    var liveApp = angular.module('liveApp', []);

    liveApp.controller('liveCtrl', function ($scope) {
        $scope.fileGetDetails = function (e) {

            $scope.files = [];
            $scope.$apply(function () {

                for (var i = 0; i < e.files.length; i++) {


        // NOW here UPLOAD your THE FILES.
        $scope.uploadFiles = function () {

            //FILL simple FormData WITH all the format FILE DETAILS.
            var data = new FormData();

            for (var i in $scope.files) {
                data.append("uploadedFile", $scope.files[i]);

            // ADD simple LISTENERS.
            var sdataXvhr = new XMLHttpRequest();
            sdataXvhr.addEventListener("progress", updateProgress, false);
            sdataXvhr.addEventListener("load", transferComplete, false);

            // SEND simple FILE DETAILS TO THE API.
  "POST", "/api/fileupload/");

        // simple UPDATE loader or PROGRESS BAR.
        function updateProgress(e) {
            if (e.lengthComputable) {
                document.getElementById('myphoto').setAttribute('value', e.loaded);

        // message simple CONFIRMATION.
        function transferComplete(e) {
            alert("your simple Files uploaded successfully.");

angularjs file upload with progress Varible

The second method simple call to uploadFiles() is called when the simple user press the clicks the upload button.To simple upload multipart or multiple the files, first we am using FormData() object to collect the multiple file details from the array $scope.files[]. multipart or multiple Once we have extracted the details, we will create a call to the Web API for upload. To do this we am using http progress XMLHttpRequest. This is one of easy way method to create HTTP progress requests, using both simple API Method Like as a data post to REQUEST GET method and POST method. Here, however we have to create a POST method request, since we am sending jus file or multipart or multiple to the server to upload.

READ :  Angular 6 CRUD Operations Application Tutorials

$scope.uploadFiles = function ()


I hope you have Got What is angularjs multiple file upload example And how it works.I would Like to have FeadBack From My Blog( readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article( Are Most Always Welcome.