We got the following code in our controller:
[HttpPost("v1/item/{id}/images")]
public async Task<ActionResult> UploadImage([FromRoute]string Id, [FromForm]IFormFile file)
{
//Upload image logic
}
Local this code works like we expect it to work. When we put this on Azure we get the following response.
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"Bad Request","status":400,"traceId":"|1587f1cc093cd640a1ece0a37a6b33b5.d408b19_"}
It looks like we are not allowed to upload an file this way on Azure. But cannot find any way to make this work.
The project is an .NET Core 2.2 MVC project and it runs on an standaard Azure Web App.