Fix the "Upload firmware" button

The "Upload firmware" button was not calling the uploadImage()
function in api-utils.js.
The uploadImage() function was not making the correct call to
the /upload/image REST API.
Removed the confirmUpload function since not needed on a
upload since the user has already selected the file they
want to upload, pressed "Open", and then pressed the
"Upload firmware" button.

Resolves openbmc/openbmc#2770

Tested: Uploaded several images to a Witherspoon system.
Change-Id: Ia0e0ffba501066f59a4355b8f61595e30aea3f98
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index cafc707..873327c 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -33,7 +33,6 @@
                     $scope.bmcActiveVersion = "";
                     $scope.hostActiveVersion = "";
                     $scope.display_error = false;
-                    $scope.confirm_upload_image = false;
                     $scope.reboot_confirm = false;
                     $scope.preserve_settings_confirm = false;
                     $scope.delete_image_id = "";
@@ -85,27 +84,23 @@
                     }
 
                     $scope.upload = function(){
-                        if(!$scope.file_empty){
-                            $scope.confirm_upload_image = true;
+                        if($scope.file) {
+                            $scope.uploading = true;
+                            APIUtils.uploadImage($scope.file).then(function(response){
+                                $scope.uploading = false;
+                                if(response.status == 'error'){
+                                    $scope.displayError({
+                                        modal_title: response.data.description,
+                                        title: response.data.description,
+                                        desc: response.data.exception,
+                                        type: 'Error'
+                                    });
+                                }else{
+                                    $scope.loadFirmwares();
+                                }
+                            });
                         }
                     }
-                    $scope.confirmUpload = function(){
-                        $scope.uploading = true;
-                        APIUtils.uploadImage($scope.file).then(function(response){
-                            $scope.uploading = false; 
-                            if(response.status == 'error'){
-                                $scope.displayError({
-                                    modal_title: response.data.description,
-                                    title: response.data.description,
-                                    desc: response.data.exception,
-                                    type: 'Error'
-                                });
-                            }else{
-                                $scope.loadFirmwares();
-                            }
-                        });
-                        $scope.confirm_upload_image = false;
-                    }
 
                     $scope.download = function(){
                         $scope.downloading = true;