Customizing Kendo Editor's uploadUrl

2 posts, 0 answers
  1. Raid
    Raid avatar
    1 posts
    Member since:
    Oct 2011

    Posted 10 Dec 2015 Link to this post

    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

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 12 Dec 2015 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top