File tree 3 files changed +17
-8
lines changed
3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ Name | Description | Example |
147
147
(onFileOver) | On drop over function| (onFileOver)="fileOver($event)"
148
148
(onFileLeave) | On drop leave function| (onFileLeave)="fileLeave($event)"
149
149
accept | String of accepted formats | accept="png"
150
+ directory | Whether directories are accepted | directory="true"
150
151
dropZoneLabel | Text to be displayed inside the drop box | dropZoneLabel="Drop files here"
151
152
dropZoneClassName | Custom style class name(s) to be used on the "drop-zone" area | dropZoneClassName="my-style"
152
153
contentClassName | Custom style class name(s) to be used for the content area | contentClassName="my-style"
Original file line number Diff line number Diff line change 4
4
(dragover) ="onDragOver($event) "
5
5
(dragleave) ="onDragLeave($event) ">
6
6
< div [className] ="contentClassName ">
7
- < input
8
- type ="file "
9
- #fileSelector
10
- [accept] ="accept "
11
- [multiple] ="multiple "
12
- (change) ="uploadFiles($event) "
13
- class ="ngx-file-drop__file-input "
14
- />
7
+ < input
8
+ type ="file "
9
+ #fileSelector
10
+ [accept] ="accept "
11
+ [attr.directory] ="directory || undefined "
12
+ [attr.webkitdirectory] ="directory || undefined "
13
+ [attr.mozdirectory] ="directory || undefined "
14
+ [attr.msdirectory] ="directory || undefined "
15
+ [attr.odirectory] ="directory || undefined "
16
+ [multiple] ="multiple "
17
+ (change) ="uploadFiles($event) "
18
+ class ="ngx-file-drop__file-input "
19
+ />
15
20
16
21
< ng-template #defaultContentTemplate >
17
22
< div *ngIf ="dropZoneLabel " class ="ngx-file-drop__drop-zone-label "> {{dropZoneLabel}}</ div >
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ export class NgxFileDropComponent implements OnDestroy {
27
27
@Input ( )
28
28
public accept : string = '*' ;
29
29
30
+ @Input ( )
31
+ public directory : boolean = false ;
32
+
30
33
@Input ( )
31
34
public multiple : boolean = true ;
32
35
You can’t perform that action at this time.
0 commit comments