UploadFile callback is not being triggered in CKEditor

前端 未结 1 1170
清歌不尽
清歌不尽 2021-01-23 07:01

I am using latest Full CKEditor (4.5.3) with Office2013 style enabled.

I added filebrowserImageUploadUrl option here:

CKEDITOR.replace(         


        
1条回答
  •  不要未来只要你来
    2021-01-23 07:34

    As it was guessed by @Wiktor the issue was in setting proper headers. I was almost there, setting wrong headers.

    Right headers are obviously: "text/html" (not "plain/text", it recognizes it just as a text in this case)

        $uploadResponse = new Response();
        $uploadResponse->headers->set('Content-type', 'text/html');
    
        $content = "";
    
        $uploadResponse->setContent($content);
    

    0 讨论(0)
提交回复
热议问题