79780497

Date: 2025-10-01 21:53:59
Score: 1
Natty:
Report link

A better way you can send an array could be as follows

const arr = [1,2,3,4,5];
const form = new FormData();
arr.forEach(element => {
    form.append('name_of_field[]', element)
});
const result = await axios.post("/admin/groups", form, {
    headers: { 'Content-Type': 'multipart/form-data' }
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jorge Peraza