CKFinder. Rename uploaded files

霸气de小男生 提交于 2019-12-02 10:23:31

Well, i figured out how to solve my problem. When you download CKFinder zip package from official server there is Visual Studio project with source code. We need to find FileUploadCommandHandler.cs class, located in CKFinder.Connector.CommandHandlers namespace. We need to find SendResponse(...) method. Then find sFileName variable. Here we can write our custom logic beside main logic, like so:

//custom logic
sFileName = Util.MyCustomRenameLogic(sFileName);
//other logic

Also we can analyze all code, it is pretty simple. For example, we can add our custom logic to rename files, folders, change images quality, make watermark prints and so on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!