Hello Developers,
We bought CKFinder for our AJAX application, integrated it with CKEditor, also we have storage limit for each account on our application, it means we need to disable the upload button on CKFinder, I am a developer, and I know I can set parameter $config['AccessControl']['fileUpload'] on the file config.php, and it works.
now, the problem is we have 2 MB limit on our application, and the current storage is 1.5MB, when I open the CKFinder, the upload button is enabled, how can i do this:
1. after I uploaded a new image (size is 300KB), and the current storage is 1.8MB, and I tried to upload another new image(500 KB). now the storage is 2.3MB, it exceeds our limit, so I $config['AccessControl']['fileUpload'] = false on the file config.php, and it told me 'It was not possible to complete the request due to authorization restrictions', but the upload button is still enabled, how can i disable it without a hard refresh?
also I need to call parentWindow to refresh our application, how can I do it?
2. once our current storage is 2.3MB, the upload button is disabled, I tried to delete the image, the size is 500KB. now the current storage is 1.8MB, how can I enable the upload button without a hard refresh after I deleted it. also, I need to call parentWindow to refresh our application.
That is my problem, can you help me?
Thanks,
Kohyea
We bought CKFinder for our AJAX application, integrated it with CKEditor, also we have storage limit for each account on our application, it means we need to disable the upload button on CKFinder, I am a developer, and I know I can set parameter $config['AccessControl']['fileUpload'] on the file config.php, and it works.
now, the problem is we have 2 MB limit on our application, and the current storage is 1.5MB, when I open the CKFinder, the upload button is enabled, how can i do this:
1. after I uploaded a new image (size is 300KB), and the current storage is 1.8MB, and I tried to upload another new image(500 KB). now the storage is 2.3MB, it exceeds our limit, so I $config['AccessControl']['fileUpload'] = false on the file config.php, and it told me 'It was not possible to complete the request due to authorization restrictions', but the upload button is still enabled, how can i disable it without a hard refresh?
also I need to call parentWindow to refresh our application, how can I do it?
2. once our current storage is 2.3MB, the upload button is disabled, I tried to delete the image, the size is 500KB. now the current storage is 1.8MB, how can I enable the upload button without a hard refresh after I deleted it. also, I need to call parentWindow to refresh our application.
That is my problem, can you help me?
Thanks,
Kohyea
Re: how to catch events of ckfinder
CKFinder is an Ajax file manager. It sends appropriate commands to the server and receives appropriate responses based on which it takes action.
What you have described sounds exactly like a something that needs to be written as a plugin.
Please refer to http://docs.cksource.com/CKFinder_2.x and choose appropriate language. For every of these languages a description was provided how to write plugins E.g. for Java - http://docs.cksource.com/CKFinder_2.x/D ... va/Plugins
Re: how to catch events of ckfinder
Thanks for your reply, so can you please tell me how to hook up some function on my parent window when upload/delete some file via javascript, I know I can hook up the callback on onBeforeExecuteCommand when I create a plugin, but I don't know how to call the javascript function.
Thanks,
Kohyea