0

I have the following CKEditor and CKFinder 3 set up in my cshtml:

        <script>
            var editor = CKEDITOR.replace('editor11', {
                htmlEncodeOutput: true,
                wordcount: {
                    showWordCount: false,
                    showCharCount: false,
                    countSpacesAsChars: true,
                    countHTML: false
                },
            });
            CKFinder.setupCKEditor(editor, null, { type: 'Images' });
        </script>

with the following to specify the connector:

        <add key="ckfinderRoute" value="/ckfinder/connector"/>

which is used in the ConnectorConfig class, method Configuration thusly:

        var route = ConfigurationManager.AppSettings["ckFinderRoute"];
        app.Map(route, SetupConnector);

When running my app on my local machine, this works as expected. However, after doing a straight publish to our DEV server,without changing any configuration, I get the following error when either Browser Server or Send it to the Server is attempted:

enter image description here

When I view source after dismissing the error message, I see that ckfinder.html is loaded as expected.

Can anyone help?

Scott
  • 2,456
  • 3
  • 32
  • 54

1 Answers1

0

To use file upload feature , only two points are necessary -

  1. Give file browser path in script -

    filebrowserUploadUrl: "/admin/upload/upload_editor_image"

  2. Having file on the same path (admin/upload/upload_editor_image), that is used to upload your file and sending script back to return url at last ,

    echo "window.parent.CKEDITOR.tools.callFunction($_GET['CKEditorFuncNum'], '" . $image_server_url . $image . "', '');";

    • $image_server_urlis the url where the image get uploaded .

    • $image is the name of the image

Please check your upload path.

aishwarya
  • 272
  • 3
  • 10