I'm trying to send a file from a postman to a web api, method on web api is expecting a list of type which contains doc type, file and folder name.. posted below:
Web api method:
[HttpPost("post-images")]
public async Task<IList<RepositoryItem>> PostAnImages (IList<PostRepoRequest> request)
{
// rest of the code
}
PostRepoRequest class:
public class PostRepoRequest
{
public FileType FileType { get; set; }
public IFormFile File { get; set; }
public string Folder { get; set; }
}
As it's possible to notice I've never received a file, its allways null,
I've tried also setting a header content-type as multipart/form-data but that didn't worked aswell..
What might be the trick here?
Thanks
Cheers


