I would like to generate a new custom error message if a user attempts to delete a file or folder that they are not allowed due to that file/folder being referenced by something else. If the file/folder is being referenced by something else, then I would like to include in the error message the name of the thing that is referencing it so that the user knows how to resolve the issue and move forward.
I understand I can modify the DeleteFileCommandHandler and DeleteFolderCommandHandler to implement the new logic and throw a new error, but how can I propogate that error information from here down to the client where the user can see it?
I understand I can modify the DeleteFileCommandHandler and DeleteFolderCommandHandler to implement the new logic and throw a new error, but how can I propogate that error information from here down to the client where the user can see it?
Re: Add custom information to error message
Check the attached file for an idea on how to return a custom error message to CKFinder (I assumed that you're using the ASP.NET connector).
After applying this patch, just call
in DeleteFolderCommandHandler .
See the documentation for more details:
http://docs.fckeditor.net/CKFinder/Serv ... r_Messages
http://docs.fckeditor.net/CKFinder/Serv ... FileUpload (the file upload commands return results in a different way).
Attachments:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+