Skip to content
Advertisement

ckeditor : set header while uploading an image

I am using CKeditor 4. In that Image plugin.

I have removed unwanted tabs on Image popup and also set the config.filebrowserImageUploadUrl to my server’s URL.

Now I have to upload the image, I am able to select the image, then when I click on Send it to server button, AJAX call goes to my server, But my server requires a particular header set for authentication.

Question is – can I set the header before sending that request ?

Advertisement

Answer

The default upload tab of CKEditor doesn’t use any AJAX call to upload files. It’s just an iframe with a normal form and file input, so you can’t change the request headers.

If you want to upload files with an AJAX call then you must write your own code or use the SimpleUploads plugin, and configure it to your needs. (disclaimer: I’m its author)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement