diff --git a/README.md b/README.md index ee3615d..f19afff 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,10 @@ autoCropArea: 0.8 /** Whether to auto upload file on file choose or not. Default: true. You can get files list by accessing component files. */ @Input() enableAutoUpload = true; + +/** capture paramerter for file input such as user,environment*/ +@Input() fileInputCapture: string; + ``` ## Output events diff --git a/projects/file-picker/README.md b/projects/file-picker/README.md index 80ed24e..ced42b9 100644 --- a/projects/file-picker/README.md +++ b/projects/file-picker/README.md @@ -192,6 +192,10 @@ autoCropArea: 0.8 /** Whether to auto upload file on file choose or not. Default: true. You can get files list by accessing component files. */ @Input() enableAutoUpload = true; + +/** capture paramerter for file input such as user,environment*/ +@Input() fileInputCapture: string; + ``` ## Output events diff --git a/projects/file-picker/package.json b/projects/file-picker/package.json index 4a1b219..2b6d70d 100644 --- a/projects/file-picker/package.json +++ b/projects/file-picker/package.json @@ -1,6 +1,6 @@ { "name": "ngx-awesome-uploader", - "version": "12.0.2", + "version": "12.0.3", "description": "Angular Library for uploading files with Real-Time Progress bar, File Preview, Drag && Drop and Custom Template with Multi Language support", "peerDependencies": { "@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0", diff --git a/projects/file-picker/src/lib/file-picker.component.html b/projects/file-picker/src/lib/file-picker.component.html index 542d398..0409c3c 100644 --- a/projects/file-picker/src/lib/file-picker.component.html +++ b/projects/file-picker/src/lib/file-picker.component.html @@ -18,6 +18,7 @@ id="fileInput" #fileInput [multiple]="uploadType === 'multi' ? 'multiple' : ''" + [attr.capture]="fileInputCapture" (click)="fileInput.value = null" (change)="onChange(fileInput.files)" [accept]="accept" diff --git a/projects/file-picker/src/lib/file-picker.component.ts b/projects/file-picker/src/lib/file-picker.component.ts index ced7f60..27563bf 100644 --- a/projects/file-picker/src/lib/file-picker.component.ts +++ b/projects/file-picker/src/lib/file-picker.component.ts @@ -82,6 +82,10 @@ export class FilePickerComponent implements OnInit, OnDestroy { /** captions object */ /** Whether to auto upload file on file choose or not. Default: true */ @Input() enableAutoUpload = true; + + /** capture paramerter for file input such as user,environment*/ + @Input() fileInputCapture: string; + cropper: any; public files: FilePreviewModel[] = []; /** Files array for cropper. Will be shown equentially if crop enabled */