Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,17 @@ export class AngularFileUploaderComponent implements OnInit, OnChanges {
const formData = new FormData();

// Add data to be sent in this request
formData.append(
if(this.config.formKey){
formData.append(
this.config.formKey,
this.selectedFiles[inx],
);
}else{
formData.append(
this.Caption[inx] || 'file' + inx,
this.selectedFiles[inx],
);
);
}

this.currentUploads.push({xhr: xhr, formData: formData, inxs: [inx]});
});
Expand All @@ -225,10 +232,17 @@ export class AngularFileUploaderComponent implements OnInit, OnChanges {

// Add data to be sent in this request
this.selectedFiles.forEach((selectedFile, inx) => {
formData.append(
if(this.config.formKey){
formData.append(
this.config.formKey,
this.selectedFiles[inx],
);
}else{
formData.append(
this.Caption[inx] || 'file' + inx,
this.selectedFiles[inx],
);
);
}
});

this.currentUploads.push({xhr: xhr, formData: formData, inxs: this.selectedFiles.map((selectedFile, inx) => inx)});
Expand Down