Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do CKEditor 5 Image Uploading?

ClassicEditor
    .create( editorElement, {
        ckfinder: {
            uploadUrl: 'my_server_url'
        }
    } )
    .then( ... )
    .catch( ... );

What should be my server response? I am using Java in the backend. Whatever my response is, it throws a dialog box 'cannot upload file'.

like image 942
Palaniappan RM Avatar asked Mar 20 '18 13:03

Palaniappan RM


1 Answers

Success response :

{
    "uploaded": true,
    "url": "http://127.0.0.1/uploaded-image.jpeg"
}

Failure response :

{
    "uploaded": false,
    "error": {
        "message": "could not upload this image"
    }
}
like image 91
Ganesh prajapati Avatar answered Sep 23 '22 21:09

Ganesh prajapati