Skip to main content
A newer version of this page is available. .
Tab

FileManagerSettings.ThumbnailFolder Property

Specifies the path to the folder that contains thumbnails.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public virtual string ThumbnailFolder { get; set; }

Property Value

Type Default Description
String String.Empty

The thumbnails root path.

Property Paths

You can access this nested property as listed below:

Show 21 property paths

Remarks

For better performance, the file manager stores content-based thumbnails in the location specified by the ThumbnailFolder property.

Important

Note that the folder that contains thumbnails must be placed physically inside the application folder.

Note

  • By default, thumbnails are created in the public “~\Thumb\“ folder that can result in unauthorized access to private files’ thumbnails.
  • Thumbnail folders structure is based on the source folder relative paths. Therefore, if you change the root folder dynamically, the file manager can display incorrect thumbnails.

  • We recommend you to dynamically specify a thumbnail folder and set restricted access for these thumbnail folders to prevent the issues described above. To learn more see the Security Considerations topic.

Concept

Thumbnails

Example

FileManager - ThumbnailFolder Property

Web Forms (declaratively):

<dx:ASPxFileManager ID="fileManager" runat="server" ...>
    <Settings RootFolder="~/Content/FileManager/Files" ThumbnailFolder="~/Content/FileManager/Thumbnails" 
    AllowedFileExtensions=".jpg, .jpeg, .gif, .png" InitialFolder="~/Content/FileManager/Images"/>
    ...
</dx:ASPxFileManager>

Web Forms (in code):

ASPxFileManager fm = new ASPxFileManager();
fm.ID = "ASPxFileManager1";
fm.SettingsUpload.ValidationSettings.DisableHttpHandlerValidation = true;
Page.Form.Controls.Add(fm);
...
fm.Settings.RootFolder = Url.Content("~/Content/FileManager/Files");
fm.Settings.ThumbnailFolder = Url.Content("~/Content/FileManager/Thumbnails");
fm.Settings.InitialFolder = Url.Content("~/Content/FileManager/Images");
fm.Settings.AllowedFileExtensions=new String[] { ".jpeg", ".jpg", ".gif", ".png" };

MVC:

@Html.DevExpress().FileManager( settings => {
    settings.Name = "fileManager";

    settings.Settings.ThumbnailFolder = Url.Content("~/Content/FileManager/Thumbnails");
    settings.Settings.RootFolder = Url.Content("~/Content/FileManager/Files");
    settings.Settings.InitialFolder = "~/Content/FileManager/Images";
    settings.Settings.AllowedFileExtensions= new String[] { ".jpeg", ".jpg", ".gif", ".png" };
    ...
}).BindToFolder(Model).GetHtml()

Online Demo

See Also