We are integrating CKFinder with CKEditor. One issue we have is that our files are not uploaded to a physical location but to our database. We have Struts actions to handle uploading and downloading the files. I am able to upload the files to our database, but I am having difficulties figuring out how to get the file image/link on our page and how to get our file list displaying in CKFinder.
I have set these URLs in /js/ckeditor/config.js:
config.filebrowserBrowseUrl = '/js/ckfinder/ckfinder.html';
config.filebrowserImageBrowseUrl = '/js/ckfinder/ckfinder.html?Type=Images';
config.filebrowserFlashBrowseUrl = '/js/ckfinder/ckfinder.html?Type=Flash';
config.filebrowserUploadUrl = 'ourFileUpload.do';
config.filebrowserImageUploadUrl = 'ourFileUpload.do';
config.filebrowserFlashUploadUrl = 'ourFileUpload.do';
1. If I change filebrowserBrowseUrl to the name of a Struts action, the Upload tab disappears. Do I have to have filebrowserBrowseUrl to be '/js/ckfinder/ckfinder.html'?
2. Do I need to call ckfinder.html with some specific parameters in order to execute our Struts action to get the list of uploaded files?
3. What does my ourFileUpload.do action need to do in order to return what CKFinder wants so that the file image/link gets into the page?
I have set these URLs in /js/ckeditor/config.js:
config.filebrowserBrowseUrl = '/js/ckfinder/ckfinder.html';
config.filebrowserImageBrowseUrl = '/js/ckfinder/ckfinder.html?Type=Images';
config.filebrowserFlashBrowseUrl = '/js/ckfinder/ckfinder.html?Type=Flash';
config.filebrowserUploadUrl = 'ourFileUpload.do';
config.filebrowserImageUploadUrl = 'ourFileUpload.do';
config.filebrowserFlashUploadUrl = 'ourFileUpload.do';
1. If I change filebrowserBrowseUrl to the name of a Struts action, the Upload tab disappears. Do I have to have filebrowserBrowseUrl to be '/js/ckfinder/ckfinder.html'?
2. Do I need to call ckfinder.html with some specific parameters in order to execute our Struts action to get the list of uploaded files?
3. What does my ourFileUpload.do action need to do in order to return what CKFinder wants so that the file image/link gets into the page?
Re: How to use custom actions with CKFinder
2. If your files are stored in the database, make sure that the standalone version of CKFinder works as expected first. Basically, you need to rewrite the server side connector, because the default connector is designed to work with local file system.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+