angular.module('app').directive('ngSimpleUpload', [function () {
    return {
        scope: {
            webApiUrl: '@',
            callbackFn: '='
        },
        link: function (scope, element, attrs) {
            element.on('change', function (evt) {
                var files = evt.__files_ || (evt.target && evt.target.files);

                var fd = new FormData();
                angular.forEach(files, function (v, k) {
                    fd.append('file', files[k]);
                });

                return $.ajax({
                    type: 'POST',
                    url: scope.webApiUrl,
                    data: fd,
                    async: true,
                    cache: false,
                    contentType: false,
                    processData: false
                }).done(function (d) {
                    scope.callbackFn(d);
                }).fail(function (x) {
                    console.log(x);
                });
            });
        }
    }
}]);

@@ -143,16 +143,43 @@
 kFn: '='
+,%0A            buttonId: '@'
 %0A       
@@ -227,24 +227,650 @@
 t, attrs) %7B%0A
+            // if button id value exists%0A            if (scope.buttonId) %7B%0A                $('#' + scope.buttonId).on('click', function () %7B%0A                    // retrieves files from file input%0A                    var files = element%5B0%5D.files;%0A                    // will not fire until file(s) are selected%0A                    if (files.length == 0) %7B%0A                        console.log('No files detected.');%0A                        return false;%0A                    %7D%0A%0A                    Upload(files);%0A                %7D);%0A            %7D%0A            else %7B%0A                // original code, trigger upload on change%0A    
             
@@ -903,24 +903,28 @@
 ion (evt) %7B%0A
+    
             
@@ -986,24 +986,131 @@
 et.files);%0A%0A
+                    Upload(files);%0A                %7D);%0A            %7D%0A%0A            function Upload(files) %7B%0A
             
@@ -1584,24 +1584,83 @@
 ction (d) %7B%0A
+                    // callback function in the controller%0A
             
@@ -1788,34 +1788,32 @@
 );%0A            %7D
-);
 %0A        %7D%0A    %7D

Update ng-simple-upload.js