1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Support form-data arrays

This commit is contained in:
Ben Hardill 2022-12-24 19:32:33 +00:00
parent 4115c13a65
commit 5670bd8265
No known key found for this signature in database
GPG Key ID: 74DD076979ABB1E7

View File

@ -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));
}