Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Nov 20, 2016
1 parent f47455e commit 5d171ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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.5.0",
"version": "1.5.1",
"license": "MIT",
"main": "ng2-uploader.js",
"typings": "ng2-uploader.d.ts",
Expand Down
8 changes: 6 additions & 2 deletions src/directives/ng-file-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ export class NgFileSelectDirective {
@Output() onPreviewData: EventEmitter<any> = new EventEmitter();
@Output() onUploadRejected: EventEmitter<UploadRejected> = new EventEmitter<UploadRejected>();

_options:any;
_options: any;

@Input()
get options(): any {
return this._options;
}

@Input('options')
set options(value: any) {
this._options = value;
this.uploader.setOptions(this.options);
Expand Down Expand Up @@ -82,6 +82,10 @@ export class NgFileSelectDirective {
}

@HostListener('change') onChange(): void {
if (!this.el.nativeElement.files) {
return;
}

this.files = Array.from(this.el.nativeElement.files);
if (this.options.filterExtensions && this.options.allowedExtensions) {
this.filterFilesByExtension();
Expand Down

0 comments on commit 5d171ad

Please sign in to comment.