The documentation explains the JavaScript configuration required, and how the dropped image is sent to the server:
Uploading Dropped or Pasted Files - CKEditor 4 Documentation[
^]
The server-side code will essentially be a standard file upload script, except it needs to return a JSON response as detailed in the documentation.
{
"uploaded": 1,
"fileName": "foo.jpg",
"url": "/files/foo.jpg"
}