I use CKFinder 1.4.1.1 with CKEditor 3.0.1, and my server environment is tomcat, so I have to implemented a java connector according to the CKFinder server side intergration document. Now everything is ok in CKFinder except using Upload tab on CKEditor to upload a file. According to the CKEditor's document, the config object is :
{
filebrowserBrowseUrl: 'ckfinder/ckfinder.html',
filebrowserImageBrowseUrl: 'ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl: 'ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl: 'ckfinder/core/connector/java/connector?command=QuickUpload&type=Files',
filebrowserImageUploadUrl: 'ckfinder/core/connector/java/connector?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl: 'ckfinder/core/connector/java/connector?command=QuickUpload&type=Flash'
}
In my implement of QuickUpload command, following text will return after upload finish:
<script language="javascript">
window.parent.OnUploadCompleted(0, '/Userfiles/Images/test.jpg', 'test.jpg');
</script>
but the browser will report there is no method OnUploadCompleted can be found.
Also, in FileUpload command's server side integration document, it's said the possible response values are:
OnUploadCompleted( 0 ) : no errors found on the upload process.
OnUploadCompleted( 1, 'Reason' ) : the upload filed because of "Reason".
OnUploadCompleted( 201, 'FileName(1).ext' ) : the file has been uploaded successfully, but its name has been changed to "FileName(1).ext".
OnUploadCompleted( 202 ) : invalid file.
but I found the correct response value should be:
OnUploadCompleted('FileName.ext', 'Reason')
{
filebrowserBrowseUrl: 'ckfinder/ckfinder.html',
filebrowserImageBrowseUrl: 'ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl: 'ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl: 'ckfinder/core/connector/java/connector?command=QuickUpload&type=Files',
filebrowserImageUploadUrl: 'ckfinder/core/connector/java/connector?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl: 'ckfinder/core/connector/java/connector?command=QuickUpload&type=Flash'
}
In my implement of QuickUpload command, following text will return after upload finish:
<script language="javascript">
window.parent.OnUploadCompleted(0, '/Userfiles/Images/test.jpg', 'test.jpg');
</script>
but the browser will report there is no method OnUploadCompleted can be found.
Also, in FileUpload command's server side integration document, it's said the possible response values are:
OnUploadCompleted( 0 ) : no errors found on the upload process.
OnUploadCompleted( 1, 'Reason' ) : the upload filed because of "Reason".
OnUploadCompleted( 201, 'FileName(1).ext' ) : the file has been uploaded successfully, but its name has been changed to "FileName(1).ext".
OnUploadCompleted( 202 ) : invalid file.
but I found the correct response value should be:
OnUploadCompleted('FileName.ext', 'Reason')
Re: Is CKFinder server side integration document correct?
That documentation is aimed at the FCKeditor integration. CKEditor is slightly different, I've tried to explain the differences here: http://alfonsoml.blogspot.com/2009/12/u ... ditor.html
Re: Is CKFinder server side integration document correct?
Thanks, I have updated the documentation.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Is CKFinder server side integration document correct?
thanks a lot
Re: Is CKFinder server side integration document correct?
request:
response:
question 1: what is the usage of CKEditor instance id 'editor1'?
question 2: parameter CKEditorFuncNum is a constant 2 or how to determine this value?
Re: Is CKFinder server side integration document correct?
the CKEditor name is for your internal use (if you want to), and the CKEditorFuncNum is a parameter that you must read.
Re: Is CKFinder server side integration document correct?
Now I understand, they were appended automatically by ckeditor.
Thanks again.