Ckeditor5: Could support setRequestHeader?

Created on 22 Feb 2019  路  10Comments  路  Source: ckeditor/ckeditor5

https://github.com/ckeditor/ckeditor5-adapter-ckfinder/blob/0e5585387a18c7cb139d1fc701c55fa930014a72/src/uploadadapter.js#L129

My website configs with authorization header, so could you support this feature?
Thx

adapter-ckfinder question

Most helpful comment

Very powerful. Thank you @Mgsy , i will write a plugin by the docs.

All 10 comments

cc @Mgsy

Hi @ZekeXu, are you using CKFinder for uploading images? This repository contains the upload adapter for CKFinder, if you want to create your own adapter, take a look at our custom image upload adapter guide.

Very powerful. Thank you @Mgsy , i will write a plugin by the docs.

@Mgsy I see this is a similar question to ckeditor/ckeditor5#2110, I just posted a comment there about Reinmar's response but yours appears to be the same. I don't want to create my own adapter, I just want to add a header, why is it so difficult to implement?

https://github.com/ckeditor/ckeditor5-adapter-ckfinder/issues/10#issuecomment-487366977

@Mgsy I see this is a similar question to ckeditor/ckeditor5#2110, I just posted a comment there about Reinmar's response but yours appears to be the same. I don't want to create my own adapter, I just want to add a header, why is it so difficult to implement?

#10 (comment)
Maybe the idea is good. However, if they support the feature , it may bring some safe questions,

@qqaimh could you elaborate?

elaborate

I have give up to use the series of ckeditor, As I am using Angular, I think they are so trouble to combine with Angular.

I also use it with angular, other then typescript typings would be great, the library works fine with Angular 7 imho. I hoped you woul elaborate on the 'safe questions?'

I also use it with angular, other then typescript typings would be great, the library works fine with Angular 7 imho. I hoped you woul elaborate on the 'safe questions?'

In my opinion,If it support setRequestHeader ,it may be easily used to evil upload something to server by someone. like set a jwt token

The default adapter should allow one to set headers and reformat the response body to conform to the file manager's specification (and set request params). These are the most common operations one will have to do. Having to rollout a custom uploader and a plugin for this that will reimplement 98% of the code contained in the out the box implementation should not be necessary. This is a somewhat unfriendly API.

At minimum UploadAdapter should be made public so one can override ~upload and~ sendRequest. But, this is not as ideal as having these options out of the box.

With TinyMCE I can just say images_upload_handler: uploadFunction. Very easy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Reinmar picture Reinmar  路  3Comments

pomek picture pomek  路  3Comments

hamenon picture hamenon  路  3Comments

msamsel picture msamsel  路  3Comments

devaptas picture devaptas  路  3Comments