0

CKFinder being used is 3.4 for ASP.NET. It is operating on S3 file system (custom driver) with the following structure.

folder structure

When content of the "Forms" folder is requested, CKFinder never completes and keeps displaying "Please wait. Loading..." even though GetFiles request has completed and returned JSON result. Here is the request.

GetFiles request

And here is the response.

GetFiles response

According to the docs (http://docs.cksource.com/ckfinder3-net/commands.html#command_getfiles) GetFiles response should be a JSON object structured like { files:[...], currentFolder:{...}, resourceType:'...' }.

But for the "Forms" folder CKFinder only returns "files" data, there is no "currentFolder" and "recourceType" properties. This leads to the following JS error and makes CKFinder break and show "Please wait. Loading..." forever.

JS error

So, for some folders CKFinder returns incomplete JSON response which leads to JS error and frozen UI.

Does anyone have an idea why CKFinder would generate incomplete GetFiles response?

ivan
  • 628
  • 5
  • 14
  • What do you mean by _custom driver_? Did you implement your own storage adapter? Is this issue reproducible with the default adapter for S3? – zaak Feb 15 '17 at 07:39
  • @zaak yes, custom implementation of IFileSystem for S3, and I believe it works. It even works for described folder structure in most of the cases, but for some folders it fails due to incorrect JSON response. – ivan Feb 15 '17 at 11:08
  • 1
    Is there any reason you didn't use the adapter for S3 shipped with CKFinder 3.4 for ASP.NET? Looking at the code of the connector, the reason may be an inconsistent behavior of your custom adapter. Could you please check if `FolderExistsAsync` returns `true` for this particular folder? Proper emulation on S3 might be a bit tricky, as there are no folders per se. – zaak Feb 15 '17 at 19:12
  • 1
    @zaak, thanks for pointing me to right direction. – ivan Feb 16 '17 at 06:44

1 Answers1

0

There was inaccurate folder detection logic in the IFileSystem.FolderExistsAsync() method of custom IFileSystem implementation.

ivan
  • 628
  • 5
  • 14