Skip to content

Commit

Permalink
fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Sep 5, 2016
1 parent 538eab6 commit 271169b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ng2-uploader",
"description": "Angular2 File Uploader",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"main": "ng2-uploader.ts",
"author": "Jan Kuri <[email protected]>",
Expand Down
10 changes: 7 additions & 3 deletions src/directives/ng-file-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ export class NgFileDropDirective {
this.onPreviewData.emit(data);
});

this.events.subscribe((data: string) => {
if (data === 'startUpload') {
this.uploader.uploadFilesInQueue();
setTimeout(() => {
if (this.events instanceof EventEmitter) {
this.events.subscribe((data: string) => {
if (data === 'startUpload') {
this.uploader.uploadFilesInQueue();
}
});
}
});

Expand Down
10 changes: 7 additions & 3 deletions src/directives/ng-file-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ export class NgFileSelectDirective {
this.onPreviewData.emit(data);
});

this.events.subscribe((data: string) => {
if (data === 'startUpload') {
this.uploader.uploadFilesInQueue();
setTimeout(() => {
if (this.events instanceof EventEmitter) {
this.events.subscribe((data: string) => {
if (data === 'startUpload') {
this.uploader.uploadFilesInQueue();
}
});
}
});
}
Expand Down

0 comments on commit 271169b

Please sign in to comment.