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 34c0d35 commit e4a7099Copy full SHA for e4a7099
components/file-upload/file-uploader.class.ts
@@ -337,15 +337,16 @@ export class FileUploader {
337
};
338
xhr.open(item.method, item.url, true);
339
xhr.withCredentials = item.withCredentials;
340
- // todo
341
- /*item.headers.map((value, name) => {
342
- xhr.setRequestHeader(name, value);
343
- });*/
344
if (this.options.headers) {
345
for (let header of this.options.headers) {
346
xhr.setRequestHeader(header.name, header.value);
347
}
348
+ if (item.headers.length) {
+ for (let header of item.headers) {
+ xhr.setRequestHeader(header.name, header.value);
+ }
349
350
if (this.authToken) {
351
xhr.setRequestHeader(this.authTokenHeader, this.authToken);
352
0 commit comments