Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Thumbnail genaration

Yevhen Noskov edited this page May 13, 2017 · 1 revision

Explanation of thumbnails generation (full sample https://elfinder.codeplex.com/SourceControl/latest):

  1. Add new routing path. Example:

routes.MapRoute(null, "Thumbnails/{tmb}", new { controller = "Files", action = "Thumbs", tmb = UrlParameter.Optional });

  1. Add action to your controller with following code:

public ActionResult Thumbs(string tmb) { return Connector.GetThumbnail(Request, Response, tmb); }

  1. Set property ThumbnailsUrl in your roots:

ThumbnailsUrl = "Thumbnails/"

  1. Set directrory for store thumbnails. Thumbnails can be stored separately from original directory.

ThumbnailsStorage = new DirectoryInfo(Server.MapPath("~/Files"));

If your not set this property, than thumbnails will be generated "on fly" for every client's request and stored in client browser cache. Be carefull with this option because it can affect pefromance.e.e.

Clone this wiki locally