Getting wrong answers from CKFinder when inserting images using drag and drop

I am using CKEditor 4.5.1 with CKFinder 2.5 for ColdFusion 8 and the Enhanced Image and Upload Image plugins.

I have successfully integrated CKFinder with CKEditor, and I can embed images in the editor using the normal CKFinder interface. They are loaded into the desired folder and displayed in the editor. I can drag and drop images into the CKFinder interface, and they load and display very well in CKEditor.

However, when I try to drag images directly into the editor window, I get the message < server response incorrect .

Using the Chrome and Fiddler developer tools, I see that when I drag and drop images into the CKFinder interface, it calls the QuickUpload method of the connector and returns the correct JSON response. When I drag images into the editor interface, it calls the same QuickUpload method, the download fails and returns only 0 , and there is no JSON at all. The documentation says that even with a failure, it should still send JSON with an error message.

I usually created CKEditor.

<script src="/js/plugin/ckeditor/ckeditor.js"></script>
<script src="/js/plugin/ckfinder/ckfinder.js"></script>
<script type="text/javascript">
    CKEDITOR.replace( 'message');
</script>

In my config.js file for the editor, I set the required URLs.

config.filebrowserBrowseUrl = '/js/plugin/ckfinder/ckfinder.html';
config.filebrowserImageBrowseUrl = '/js/plugin/ckfinder/ckfinder.html?type=Images';
config.filebrowserUploadUrl = '/js/plugin/ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Files';
config.filebrowserImageUploadUrl = '/js/plugin/ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Images';

I activated the Upload Image plugin (all dependencies were downloaded using the assembly).

config.extraPlugins = 'image2,uploadimage';

config.uploadUrl, config.filebrowserUploadUrl, uploadUrl - .

CKFinder CKEditor?

+4
2

CKFinder 2.5.0 JSON. , responseType=json url config.uploadUrl config:

config.uploadUrl =
    '/js/plugin/ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Files&responseType=json';

filebrowserUploadUrl, CKEditor .

confing.uploadUrl, filebrowserUploadUrl, config.uploadUrl d & d.

+2

, :

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>CKEditor</title>
        <script src="//cdn.ckeditor.com/4.5.1/standard-all/ckeditor.js"></script>
    </head>
    <body>
        <textarea name="editor1"></textarea>
        <script>
            CKEDITOR.replace( 'editor1', {
                filebrowserBrowseUrl: '/js/plugin/ckfinder/ckfinder.html',
                filebrowserImageBrowseUrl: '/js/plugin/ckfinder/ckfinder.html?type=Images',
                filebrowserUploadUrl: '/js/plugin/ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Files',
                filebrowserImageUploadUrl: '/js/plugin/ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Images',
                extraPlugins: 'image2,uploadimage'
}           );
        </script>
    </body>
</html>

, CKFinder (2.5.0.1).

uploadUrl , filebrowserUploadUrl.

+1

All Articles