File Manager Details Type wrong

Hello,


When selecting a pdf in filemanager it has type file in details, but if two files are selected it will have type pdf. I believe it should have type pdf whether one or more are selected. Below is an example of what is happening. Please let me know if this is intended behavior.



One PDF Selected:


Two PDFs Selected:




3 Replies 1 reply marked as answer

SS Sivakumar ShunmugaSundaram Syncfusion Team May 13, 2022 12:53 PM UTC

Hi Charles,


We have validated your reported query in the Angular FileManager component. For single file selection, we have generally set the Type as File. This is the default behavior of our FileManager control. Please check the below demo for reference.


Demo: https://ej2.syncfusion.com/angular/demos/#/bootstrap5/file-manager/overview


However, we would like to know whether you want to display each file type of the file in the details popup or whether you want to retrieve the selected file type dynamically. Please confirm your exact use case in the FileManager component to assist you promptly.


Regards,

Sivakumar S



CE Charles Eichelberger replied to Sivakumar ShunmugaSundaram May 13, 2022 01:13 PM UTC

Hi, 


Is there any way to override what type is shown in the details popup? I would like it to be consistent for single file selection and multiple file selection.



SS Sivakumar ShunmugaSundaram Syncfusion Team May 16, 2022 12:17 PM UTC

Hi Charles,


We have validated your reported query in the Angular FileManager component. You can achieve your requirement by setting the selected file type in the “Details” dialog popup using the popupOpen event. Refer to the below code snippet.


[app.component.html]

<ejs-filemanager

id="overview"

#file

[ajaxSettings]="ajaxSettings"

[view]="view"

(popupOpen)="onPopupOpen($event)"

> 

</ejs-filemanager>


[app.component.ts]

onPopupOpen(args) {

  if (args.popupName == 'File Details') {

       document

      .querySelectorAll('.e-dlg-content')[1]

      .querySelector('.e-fe-value').innerText =

      this.fileObj.getSelectedFiles()[0].type;

  }

}


Sample: https://stackblitz.com/edit/angular-ttucc5-psfneb?file=app.component.ts


Please check the attached sample and get back to us if you need any further assistance.


Regards,

Sivakumar S


Marked as answer
Loader.
Up arrow icon