Unplanned
Last Updated: 27 Apr 2021 09:35 by ADMIN
Spencer
Created on: 12 Nov 2019 22:33
Category: KendoReact
Type: Feature Request
2
Bearer Authorization Headers with saveAs proxy
Is it possible to set Authorization headers when using a proxy with the kendo-file-saver saveAs function? The controller method I am trying to use as the proxy is protected by JWT Bearer token authorization. 
2 comments
Spencer
Posted on: 14 Nov 2019 17:15

Unfortunately we are serving many different file types.

Please do open up a feature request to set JWT Bearer Authorization headers for the proxyURL in saveAs. 

We've worked around this for now using a separate library, but saveAs would be much cleaner.

 

Thanks!

ADMIN
Stefan
Posted on: 13 Nov 2019 07:25

Hello, Spencer,

If this is for PDF files, I can suggest the following approach.

Convert the file to a Base64 string and programmatically make the request with the generated string with a library like axios:

https://www.telerik.com/kendo-react-ui/components/pdfprocessing/base64string/

https://stackoverflow.com/questions/51586458/how-to-pass-header-jwt-token-with-axios-react/51588921

Also, if you wish I can convert this to a public feature request, where the community can vote for this feature to be added to the saveAs method.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items