Customise Image Source on beforeGetImage

Hi,

Is there a way to modify the image source when an image is loaded in the file explorer?

We tried the following, but this did change the image source.

    beforeGetImage: function beforeGetImage(args) {
        var file = args.selectedItems[0];

        args.path = '/Images/GetImage?folderId=' + file.folderSettingId + "&id=" + file.folderId + "&fileId=" + file.id;
    }

Please advise.

Thank you

1 Reply 1 reply marked as answer

MK Muthukrishnan Kandasamy Syncfusion Team August 27, 2020 09:34 AM UTC

 
Hi Malcolm, 
 
Thanks for contacting Syncfusion support. 
 
We have validated your requirement in EJ File Explorer control. We can change the image source by using ajaxSettings property. Please refer to the below code block. 
 
$("#fileExplorer").ejFileExplorer({ 
                isResponsive: true, 
                width: "100%", 
                minWidth: "150px", 
                fileTypes: "*.png, *.gif, *.jpg, *.jpeg, *.docx", 
                layout: "tile", 
                path: "https://js.syncfusion.com/demos/ejServices/Content/FileBrowser/", 
                ajaxAction: localServ, 
                ajaxDataType: ajaxDataType, 
              ajaxSettings: {  
                    getImage: { 
                      url: "https://js.syncfusion.com/demos/ejServices/Content/FileBrowser/Employees/2.png"  
                    }  
                } 
            }); 
 
Please refer to the below link for the sample. 
 
 
Please refer to the below forums the similar problem discussed. 
 
 
 
Description 
Link 
Getting started 
Behaviors 
File actions 
How-to 
API reference 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Muthukrishnan K 


Marked as answer
Loader.
Up arrow icon