Skip to content

Commit

Permalink
creating a accept atribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir Machado committed Mar 8, 2016
1 parent 82a0b66 commit 72bc6c8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build/ng-s3upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ angular.module('ngS3upload.directives', []).
$scope.attempt = false;
$scope.success = false;
$scope.uploading = false;

var opts = angular.extend({}, $scope.$eval($attrs.s3UploadOptions || $attrs.options));
$scope.accept = opts.accept || "";
$scope.barClass = function () {
return {
"progress-bar-success": $scope.attempt && !$scope.uploading && $scope.success
Expand All @@ -177,7 +178,8 @@ angular.module('ngS3upload.directives', []).
uploadingKey: 'uploading',
folder: '',
enableValidation: true,
targetFilename: null
targetFilename: null,
accept: ''
}, opts);
var bucket = scope.$eval(attrs.bucket);

Expand Down Expand Up @@ -247,7 +249,9 @@ angular.module('ngS3upload.directives', []).

if (angular.isDefined(attrs.doUpload)) {
scope.$watch(attrs.doUpload, function(value) {
if (value) uploadFile();
if (value) {
uploadFile();
}
});
}
}
Expand Down

0 comments on commit 72bc6c8

Please sign in to comment.