# Muk-file-Uploader

A Wrapper Component for .

## Usage

### HTML

```
  <lib-muk-file-uploader
    [styleWidth]="4"
    [isMultiple]="false"
    [optionsFile]="fileOptions"
    (onSelectedFiles)="onSelectFile($event)"
  ></lib-muk-file-uploader>

  ---- in dynamic form 
     <lib-muk-dynamic-form
     [fields]="fields">
     </lib-muk-dynamic-form>
```

### TS

```
  fileOptions: FileUploadOptions = {
    maxFileSize: 25,
    allowedExtensions: ['.pptx', '.pptm', '.ppt','.json'],
    maxFilesLimit: 1,
    disableDelete: true,
    disableAnchor: false,
    disableDownload: false,
  };
  onSelectFile(event:any)
  {
    console.log('event',event)
  }

  ---in dyn
  fields!: any[];

 this.fields = [
    
      <IFormControl<IUploadFileInput>>{
        isAutofocus: false,
        isAutocomplete: false,
        columnSize: 12,
        translateLangType: null,
        controllerStyle: null,
        containerStyle: 'mb-2',
        controller: {
          name: 'file',
          label: 'file',
          controller: this._fb.control('', Validators.required),
        },
        placeholder: 'File',
        type: formControlType.fileUploader,
        controllerSpecification: <IUploadFileInput>(<unknown>{
          optionsFile:this.fileOptions,
          isMultiple: true,
        }),
      },
    ];
  
```
