so in postman, we have a form-data upload button if we want to attach a file and use POST to call an API endpoint. now my question is,
how to add a file if we are gonna use the body as a raw text payload request if let's say the body is like this ?
{
"id": 1,
"mydata": [
{
"entity_id": 1,
"upload_file": // WHAT TO PUT HERE ?
},
{
"entity_id": 2,
"upload_file": //WHAT TO PUT HERE ?
}
]
}
In backend, we're suppose to catch an attached or uploaded file using $_FILES global variable.. but if the payload request is an object array... how are we suppose to include an attached file or upload file in the payload ? .. please see example above