/* For largeicons view*/
.e-filemanager .e-large-icons .e-fe-pdf {
/*set your background image*/
background-image:
}
/* For grid view*/
.e-filemanager .e-grid .e-fe-pdf {
/*set your background image*/
background-image:
}
/*For image*/
.e-filemanager .e-grid .e-fe-image, .e-filemanager .e-large-icons .e-fe-image {
/*set your background image*/
background-image:
} |
fileLoad: function(args:FileLoadEventArgs){
if(args.module == "LargeIconsView" && (args.fileDetails as any).type == ".mp4"){
args.element.firstElementChild.removeChild(args.element.querySelectorAll(".e-list-icon.e-fe-video")[0]);
let dynamicImgEle: Element = createElement('img', { className: "e-list-img",
attrs:{src: getImageUrl(fileObject,args.fileDetails) }});
args.element.firstElementChild.insertBefore(dynamicImgEle, args.element.firstElementChild.querySelectorAll(".e-list-text")[0]);
}
} |
[Route("GetImage")]
public IActionResult GetImage(FileManagerDirectoryContent args)
{
if (args.Path.Contains(".mp4"))
{
return this.operation.GetImage("/Pictures/syncfusion-videos-fb.png", null, false, null, null);
}
else
{
return this.operation.GetImage(args.Path, args.Id, false, null, null);
}
} |
Demo link |
|
UG Documentation |
|
API reference |
|
var dynamicImgElement = document.createElement('img');
dynamicImgElement.src = getImageUrl(fileObject,args.fileDetails);
dynamicImgElement.className = "e-list-img";
|