Skip to content

Commit 68b9aa5

Browse files
Merge pull request #127 from sante85/master
add accept field
2 parents 3f1cb93 + ccc914b commit 68b9aa5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lib/ngx-drop/file-drop.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ng-content></ng-content>
66
{{headertext}}
77
<div *ngIf="showBrowseBtn">
8-
<input type="file" #fileSelector (change)="uploadFiles($event)" multiple style="display: none;" />
8+
<input type="file" #fileSelector [accept]="accept" (change)="uploadFiles($event)" multiple style="display: none;" />
99
<input type="button" [className]="customBtnStyling" value="{{browseBtnLabel}}" (click)="onBrowseButtonClick($event)" />
1010
</div>
1111
</div>

src/lib/ngx-drop/file-drop.component.ts

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import { FileSystemFileEntry, FileSystemEntry, FileSystemDirectoryEntry } from '
2222
})
2323
export class FileComponent implements OnDestroy {
2424

25+
@Input()
26+
public accept: string = '*'
2527
@Input()
2628
public headertext: string = '';
2729
@Input()

0 commit comments

Comments
 (0)