<script type="text/javascript"> var app = angular.module('myApp', ['lr.upload']); app.controller('HomeCtrl', ['$scope', 'upload', '$http', function ($scope, upload, $http) { $scope.doUpload = function () { upload({ url: 'Home/upload', method: 'POST', data: { aFile: $scope.myFile } }).then( function (response) { console.log(response.data); }, function (response) { console.error(response); } ); } } ])