So I can successfully send this request through my demo react app but with Postman I know I am doing something wrong but not sure what I am doing wrong. The server side code is fine as its working with my react app. Here iis the screenshot :
Screenshot :
So basically what I am sending is a playlist class which will have a name and image (a file) for the playlist but then I am also sending an array of tracks where each track is an object containing name of the track, duration, artist and the mp3 file. But I am getting an error although this works with react app. So I know I am doing something wrong but don’t know what I am doing wrong.
In the console, in the request body I am getting :
-
name: “my playlist”
-
image: undefined
-
tracks[0][name]: “track1”
-
tracks[0][file]: undefined
-
tracks[0][duration]: “200”
-
tracks[0][artist]: “Charlie Ryan”
So why are these files undefined, they are less than 1 mb