Api method is looks like below
[HttpPost] public async Task> MediaBrand(IFormFile file, int brandId)
Make sure the form is the correct enctype
I also had to change how the Model bind works from the generated code:
public async Task Edit([Bind("Text,Example")] Example example)
to this code:
public async Task Edit(Example example)