0

When I click "Browse Server" thumbnails are displayed for all images the first time the page loads. The second page load display thumbnails for some images or no thumbnails at all. Third and subsequent page loads display NO thumbnails.

If I load a thumbnail image src URL directly, I receive the following stacktrace.

/ckfinder/core/connector/aspx/connector.aspx?command=Thumbnail&type=Images&currentFolder=%2F&langCode=en&hash=f39457780249dcf6&FileName=EDE-AD-vt(1).png&fileHash=201210090617-94

    [SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessPermission.Demand() +58
       System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) +595
       System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) +150
       CKFinder.Connector.FolderHandler.get_ThumbsServerPath() +136
       CKFinder.Connector.CommandHandlers.ThumbnailCommandHandler.SendResponse(HttpResponse response) +473
       CKFinder.Connector.Connector.OnLoad(EventArgs e) +974
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
       System.Web.UI.Page.ProcessRequest() +80
       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
       System.Web.UI.Page.ProcessRequest(HttpContext context) +49
       ASP.admin_ckfinder_core_connector_aspx_connector_aspx.ProcessRequest(HttpContext context) in App_Web_connector.aspx.b2500d1b.24hqjdsn.0.cs:0
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

I am unable to change permissions as this site is on shared hosting. My question is two-fold:

  1. Why is directory creation necessary for thumbnail creation?
  2. Can I disable this behavior? Or can I disable thumbnail caching altogether (and always create thumbnails when requested).
vandt
  • 1

1 Answers1

0

To answer both of your questions:
CKFinder recreates folders structure in /userfiles/_thumbs folder in order to cache thumbnails there. If thumbnails were created on the fly this would kill the server when there is bigger traffic and/or bigger number of images.

The only available solution in CKFinder I see, in this particular case, is not using thumbnails (set below option in config.ascx):

Thumbnails.Enabled = false;
j.swiderski
  • 2,405
  • 2
  • 12
  • 20