devextreme-angular icon indicating copy to clipboard operation
devextreme-angular copied to clipboard

dx-file-uploader does not supported angular http interceptors

Open inyutin-maxim opened this issue 8 years ago • 6 comments

To help us process the issue more efficiently, please provide the following information:

  • Specify the version of the devextreme-angular and devextreme packages you are using.

    devexteme version: devextreme-angular version:

  • Specify the type of the issue (check one with "x"): [x] bug Report [ ] feature request [ ] support inquiry

dx-file-uploader does not supported angular http interceptor

inyutin-maxim avatar Jan 29 '18 12:01 inyutin-maxim

Yes, the DxFileUploader component does not use the Angular Http provider to send requests. As a result, your http interceptor is not called. What are you doing in your interceptor with requests? I believe there is another way to achieve this for our DxFileUploader component.

GoshaFighten avatar Jan 30 '18 18:01 GoshaFighten

Of course it is possible to transfer to a component in headers a token, but us does not arrange to track it everywhere. We rewrote this functionality without use the dx-file-uploader components

inyutin-maxim avatar Jan 31 '18 07:01 inyutin-maxim

@inyutin-maxim As far as I understand, you found a solution and this issue can be closed. Am I correct?

GoshaFighten avatar Jan 31 '18 20:01 GoshaFighten

@GoshaFighten You are right, but it could be a good feature

inyutin-maxim avatar Feb 01 '18 06:02 inyutin-maxim

I also have an issue with this. With the angular httpClient i can set the {withCredentials:true} property through the headers object. I do this for all my calls in an interceptor. But for the upload request from dx-files-upload this is not set and I didn´t find a way to set thes property of the XMLHttpRequest through your api?

joachim-bl avatar Dec 13 '18 13:12 joachim-bl

I am having the same problem I have tried to bind to the property on the control

html [uploadHeaders]="uploadHeaders"

ts uploadHeaders = { withCredentials: true };

This does not appear to work. Could you please advise how to enable the file up load control to pass credentials.

It would be useful if you had a withcredentials property on the control that could be set to true when needed.

regards Chris

ChrisMarais avatar May 03 '19 17:05 ChrisMarais