File upload component and access token
Hello
We have a file component configured to use a custom URL. The custom URL is protected with Keycloak. Is there a way to pass a bearer token as "Authorization" header?
Thanks
We are passing along the jwt token which might help. You can see the code here: https://github.com/formio/formio.js/blob/master/src/providers/storage/url.js#L60-L63
@randallknutson We need to pass the bearer token of the user rather than the one from form io. The access token will be short lived.
We don't currently have a way of passing a Bearer token to the file handler. Is that something you would like to add?
@randallknutson I think it would be good to be able to pass the token along. I'll take a look at a solution and run it past you.
Sounds good. Let us know.
@aminmc Did you find any solution for this problem?
@Dhruvv4 Yup..Basically we create our own file service and pass that into the formio service. The 3methods upload, download and delete get a token passed through in our implementation.
this can now be done using FileService and injecting it into the options for formio.
Can you provide an example?
Thanks