Api method is looks like below
[HttpPost]
public async Task> MediaBrand(IFormFile file, int brandId)
If you use javascript and FormData object you need set the name of each file to 'files'
this.files.forEach((f) => {
formData.append("files", f, `${this.path}/${f.name}`);
});
if you use other name in your post you need to set it in the attribute of the post method
formData.append("someName", f, `${this.path}/${f.name}`);
public async Task Post([FromForm(Name ="someName")] List files)
Dont forget to set content-type
'Content-Type': 'multipart/form-data'