Skip to content

Commit 4137633

Browse files
committed
Added notify support to the uploader
1 parent 0559dc9 commit 4137633

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

build/ng-s3upload.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ angular.module('ngS3upload.services', []).
7979
} else {
8080
scope.progress = 'unable to compute';
8181
}
82+
if (typeof deferred.notify === 'function') {
83+
deferred.notify({type: 'progress', value: scope.progress});
84+
}
8285
});
8386
}
8487
function uploadComplete(e) {

build/ng-s3upload.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ng-s3upload/services/s3-uploader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ angular.module('ngS3upload.services', []).
5151
} else {
5252
scope.progress = 'unable to compute';
5353
}
54+
if (typeof deferred.notify === 'function') {
55+
deferred.notify({type: 'progress', value: scope.progress});
56+
}
5457
});
5558
}
5659
function uploadComplete(e) {

0 commit comments

Comments
 (0)