I have enabled file upload to accept more file types. When images are uploaded, a thumbnail is shown. However, I'm not sure how to go about adding a thumbnail for documents that are not images, it just shows blank. Anyone knows the solution?
Code: Select all
<p-fileUpload name="myfile[]" id="file" multiple="multiple" chooseLabel="Add" [showCancelButton]="false" [showUploadButton]="false"
accept="image/*,application/*" maxFileSize="1000000" (onSelect)=onSelect($event)>
<div class="ui-fileupload-row" *ngFor="let file of files; let i = index;">
<div *ngIf="!checkImage(file)">
<div><img alt="assets/images/fileIcon.png" width="50"></div>
</div>
</div>
</p-fileUpload>