I am developing a REST API where I need to accept an array of objects. I have made a search and know how to upload a file with other parameters. Also I can send multiple files by adding them to body. But I need to send them as a property of an object and the API endpoint accepts an array of this object.
Let me explain it with an example
public class StaffInfo
{
public string FirstName { get; set; }
public string LastName { get; set; }
public IFormFile Photo { get; set; }
}
[HttpPost]
[Route("api/staff/create")]
public void AddNewStaff(StaffInfo[] newStaff)
{
:
:
}
I want to test this endpoint and can’t figure out how to send data with PostMan.
Regards.