r-hannuschka / ngx-fileupload

angular x fileupload
MIT License
20 stars 7 forks source link

Feat: Add support for withCredentials on requests #775

Closed spiralx closed 1 year ago

spiralx commented 1 year ago

Is your feature request related to a problem? Please describe. In order to authorise upload requests we need to send an HTTP-only cookie to the server, which we cannot access from JS to add to the headers manually.

Describe the solution you'd like Add a withCredentials: boolean option to NgxFileUploadOptions which can be passed to the POST request at https://github.com/r-hannuschka/ngx-fileupload/blob/master/src/projects/core/src/lib/upload/src/upload.request.ts#L204.

Describe alternatives you've considered Trying to override the HttpClient through Angular's DI mechanism, but requires Angular 15 which we're not yet at - and not sure if that would work anyway.