jQuery UI Widgets Forums Angular JqxFileUpload Set Http headers


This topic contains 1 reply, has 2 voices, and was last updated by  ivanpeevski 2 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • JqxFileUpload Set Http headers #120906



    I am trying to use JqxFileupload and it was working fine as well.

    Recently after some security related changes, I wanted to set some custom http headers while making a post call to upload URL. This change needed to add some headers in the request body and call a REST API.

    But using JqxFileUpload I am not able to add any headers. I went through the documentation but can not see any help there.
    Has anyone faced this before? If I am missing some thing please let me know.

    JqxFileUpload Set Http headers #120914


    Hello piyushp,

    Unfortunately, this functionality is not natively supported by the JqxFileUpload.
    However the FileUpload component from our new Product Line, Smart UI, allows you to easily set the Headers of the file upload’s request.

    You can take a look at the setHeaders function here: https://www.htmlelements.com/docs/fileupload-api/#toc-setheaders_any
    And here is an example:
    <smart-file-upload set-headers='function(xhr, file){ xhr.setRequestHeader("Cache-Control", "no-cache"); }}'></smart-file-upload>

    I hope this will help!

    Best Regards,
    Ivan Peevski
    jQWidgets team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.