function link(scope, element, attrs) {
             element.bind("change", function (changeEvent) {
                 scope.$apply(function () {
-                    scope.fileUpload = changeEvent.target.files[0];
+                    var fileType = changeEvent.target.accept;
+                    var ext = "." + changeEvent.target.value.match(/\.(.+)$/)[1];
+                    scope.fileUpload = null;
+                    if (typeof fileType == undefined || fileType == "") {
+                        scope.fileUpload = changeEvent.target.files[0];
+                    }
+                    else if ((Array.isArray(fileType) && fileType.indexOf(ext) > -1) || (fileType == ext)) {
+                        scope.fileUpload = changeEvent.target.files[0];
+                    }
                 });
             });
         }
 
                                "fields": {\r
                                        "fileUpload": {\r
                                                "label": "Select File",\r
-                                               "noFileSelected": "No file selected"\r
+                                               "noFileSelected": "No file selected (Select .csar file)"\r
                                        },\r
                                        "shortDescription": {\r
                                                "placeholder": "Short Description"\r