How to resolve the unsupported media type error on loading image in ASP.NET Core
Unsupported media type error occurs on the loading image in the Report Viewer and Report designer because of the
ApiController attribute. This attribute will not allow for file byte content. You can resolve the error by following these steps.
[ApiController]attribute in your controller because it is not supported to get the image from API.
Then add the
[FromBody]attribute with the PostReportAction action as shown below because we have removed the ApiController attribute from the controller.