3👍
In form data, you can’t send array directly.
In order to send array in formdata
you have to run a loop
and pass values like this:
const array = [1,2,3,4,5,6];
const formData = new FormData();
array.forEach(function(value) {
formData.append("id[]", value) // you have to add array symbol after the key name
})
- [Vuejs]-Error: ENOENT: no such file or directory, open 'C:\Users\username\Desktop\vue-tailwind-naive\tailwind.config.js'
- [Vuejs]-Vue JS – Helper Async Await function to fetch data returning undefined
Source:stackexchange.com