79132245

Date: 2024-10-28 06:24:43
Score: 1
Natty:
Report link

Turns out, I just need to remove the indexing when adding the file on the List>.

This is the solution that works perfectly fine.

files.forEach((file, fileIndex) => { 
                                                    formData.append(`vm.Items[${itemIndex}].Attachments`, file);
                                                }); 

Just remove the indexing on the .Attachments[${fileIndex}].

and if you want to, remove the fileIndex on the forEach loop. Im lazy so im not gonna remove it.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: mat mat