I have an array of objects in the format:
array1: [ { name: 'A', image: File {name: "Desert.jpg", path: "C:\Users\Public\Pictures\Sample Pictures\Desert.jpg", lastModified: 1247549551658, lastModifiedDate: Tue Jul 14 2009 11:02:31 },
{ name: 'B', image: File{name: "Desert.jpg", path: "C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg", lastModified: 1247549551658, lastModifiedDate: Tue Jul 14 2009 11:02:31} }, ..... ]
I am sending the array1 to my back end server using:
formData.append('array1', JSON.stringify(array1))
In the back end I am receiving the array as :
let array1 = JSON.parse(req.body.array1)
But in the back end, the File is empty. How can I fix this?? The front end is in React and backend in Node.