在Angular中,我使用浏览选项上传excel文件 . 但是,当我点击按钮时,它会向我显示一个跟踪器中的excel文件列表以及文件夹列表 . 如何隐藏显示文件夹列表 . 我只想显示当前文件夹中存在的excel文件列表 .

这是我的代码

<div 
  class=" input-group input-file invoiceUploadRow" 
  [ngClass]="(invoiceFullPath.invalid && (invoiceUpload.submitted || invoiceFullPath.touched)) ? 'has-error' : ''">
<input 
    [disabled]=previewScreen 
    type="file"  
    class="form-control" 
    accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,.xls,.xlsx" 
    placeholder='Choose a file...' 
    name="invoiceFullPath" 
    [(ngModel)]="model.invoiceFullPath" 
    #invoiceFullPath="ngModel" 
    (change)="onChange($event)" 
    required/>
    <div *ngIf="invoiceFullPath.invalid && (invoiceUpload.submitted || invoiceFullPath.touched)" class="help-block">
      <ng-container *ngIf="invoiceFullPath.errors?.required">Product Id is required</ng-container>
    </div>
    <span class="input-group-btn">
    <button  [disabled]=previewScreen class="btn btn-warning btn-reset" type="reset">Reset</button>
    </span>
</div>

<div class="buttons">
  <button  [disabled]=previewScreen class="btn btn-primary invoiceSubmitButton">Preview</button>
</div>