With Postman I'm trying to make a POST request to my api (see code below), to upload a file.
The request I make via Postman :
The code :
namespace Abbyytestrestapi.Controllers
{
[Route("api/Abbyy")]
[ApiController]
public class AbbyyController : ControllerBase
{
[HttpGet("Templates")]
public ActionResult GetAvailableTemplates()
{
return Ok("test");
}
[HttpPost("ConvertFile/{templateKey}")]
public ActionResult ConvertFile([FromBody] IFormFile pdfFile, string templateKey)
{
return Ok("hello");
}
}
}
Yet I get an error 400 bad request. I have no idea what I am doing wrong... Can you help me? :)
Thank you in advance