This is a migrated thread and some comments may be shown as answers.

Customizing Kendo Editor's uploadUrl

1 Answer 132 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Raid
Top achievements
Rank 1
Raid asked on 10 Dec 2015, 09:20 AM

Hello,

We have Kendo Editor in-place that needs to upload images to secured API resides in another domain. This means the request has to have some authorization token in the header so the call can be authorized correctly.

We understand that Editor's uploadURL property is limited to string only. So nothing much can be done to inject a custom header.

However, since Kendo UI core uses jQuery, we tried to implement $(document).ajaxSend to capture those AJAX requests coming from Kendo Editor and modify the header before sending the original request, but it seems it's not working and the code there never been hit.

Can you help with that? Is there a better way to achieve the same purpose?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Dec 2015, 09:53 AM
Hello Raid,

You can obtain reference to the Kendo UI Upload, which is used by the ImageBrowser, and attach an upload event handler to send additional metadata together with the file.

http://docs.telerik.com/kendo-ui/web/editor/how-to/get-reference-to-imagebrowser-child-widgets
 
http://docs.telerik.com/kendo-ui/api/javascript/ui/upload#events-upload

http://docs.telerik.com/kendo-ui/web/upload/metadata

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Raid
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or