We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97fd42a commit 926abe6Copy full SHA for 926abe6
src/app/shared/upload/uploader/uploader.component.ts
@@ -147,10 +147,10 @@ export class UploaderComponent {
147
// Ensure the behalf header is set if impersonating
148
this.uploader.options.headers = [
149
{ name: XSRF_REQUEST_HEADER, value: this.tokenExtractor.getToken() },
150
- ...(hasValue(this.uploadFilesOptions.impersonatingID)
151
- ? [{ name: this.ON_BEHALF_HEADER, value: this.uploadFilesOptions.impersonatingID }]
152
- : [])
153
];
+ if (hasValue(this.uploadFilesOptions.impersonatingID)) {
+ this.uploader.options.headers.push({ name: this.ON_BEHALF_HEADER, value: this.uploadFilesOptions.impersonatingID });
+ }
154
this.onBeforeUpload();
155
this.isOverDocumentDropZone = observableOf(false);
156
};
0 commit comments