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:
parent
4115c13a65
commit
5670bd8265
@ -435,6 +435,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
|||||||
formData.append(opt, val);
|
formData.append(opt, val);
|
||||||
} else if (typeof val === 'object' && val.hasOwnProperty('value')) {
|
} else if (typeof val === 'object' && val.hasOwnProperty('value')) {
|
||||||
formData.append(opt,val.value,val.options || {});
|
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 {
|
} else {
|
||||||
formData.append(opt,JSON.stringify(val));
|
formData.append(opt,JSON.stringify(val));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user