Skip to content

Commit

Permalink
Support form-data arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Dec 24, 2022
1 parent 4115c13 commit 5670bd8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
formData.append(opt, val);
} else if (typeof val === 'object' && val.hasOwnProperty('value')) {
formData.append(opt,val.value,val.options || {});
} else if (Array.isArray(val)) {
for (var i=0; i<val.length; i++) {
formData.append(opt, val[i])
}
} else {
formData.append(opt,JSON.stringify(val));
}
Expand Down

0 comments on commit 5670bd8

Please sign in to comment.