|
[View]
@Html.EJ().FileExplorer("fileExplorer").FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx").Path("~/content/images/FileExplorer/").AjaxAction(@Url.Content("/FileExplorer/FileActionDefault")).Width("900px").Height("400px").IsResponsive(true).EnableThumbnailCompress(true).ClientSideEvents(evt=>evt.BeforeGetImage("beforeGetImage")) |
|
public ActionResult FileActionDefault(FileExplorerParams args)
{
FileExplorerCustomOperations opeartion = new FileExplorerCustomOperations();
switch (args.ActionType)
{
case "GetImage":
//Helps to reduce thumbnail image size before loading it into FileExplorer
opeartion.GetImage(args.Path, args.CanCompress);
break;
}
} |
populated by the getImage call of the backend
|
[CSHTML]
@Html.EJ().FileExplorer("fileExplorer").ShowThumbnail(false).FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx").Path("~/content/images/FileExplorer/").AjaxAction(@Url.Content("/FileExplorer/FileActionDefault")).Width("900px").Height("400px").IsResponsive(true)
[Styles]
//Place the corresponding image for this class and align based on your wise
.e-fileexplorer .e-thumbImage.e-fe-icon.e-fe-images{
background-image:url('http://js.syncfusion.com/demos/ejServices/Content/FileBrowser/Employees/1.png');
background-position: center;
} |