Getting 400 Bad Request when using custom upload method

Dear forum,
I followed this tutorial on how to use custom upload methods. However I am only getting a 400 Bad Request. The log is as follows:

info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 POST http://localhost:5000/api/servermethods/uploadleistungsnachweise multipart/form-data; boundary=----WebKitFormBoundaryA5U3tacbU8uVFtLp 6888247
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 POST http://localhost:5000/api/servermethods/uploadleistungsnachweise multipart/form-data; boundary=----WebKitFormBoundaryA5U3tacbU8uVFtLp 6888247
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
Policy execution successful.
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
Policy execution successful.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[3]
Route matched with {action = "UploadLeistungsnachweise", controller = "ServerMethods"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult UploadLeistungsnachweise(System.Collections.Generic.IEnumerable1[Microsoft.AspNetCore.H ttp.IFormFile], Int32) on controller RadzenPm.Controllers.ServerMethodsController (server). info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[3] Route matched with {action = "UploadLeistungsnachweise", controller = "ServerMethods"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult UploadLeistungsnachweise(System.Collections.Generic.IEnumerable1[Microsoft.AspNetCore.H
ttp.IFormFile], Int32) on controller RadzenPm.Controllers.ServerMethodsController (server).
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
Successfully validated the token.
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[2]
Successfully validated the token.
infoinfo: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.1.14-servicing-32113 initialized 'ApplicationIdentityDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 2.1.14-servicing-32113 initialized 'ApplicationIdentityDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (8ms) [Parameters=, CommandType='Text', CommandTimeout='30']
SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (8ms) [Parameters=, CommandType='Text', CommandTimeout='30']
SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (8ms) [Parameters=, CommandType='Text', CommandTimeout='30']
SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (8ms) [Parameters=, CommandType='Text', CommandTimeout='30']
SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (8ms) [Parameters=, CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (8ms) [Parameters=, CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: Microsoft.EntityFrameworkCore.Migrations[20405]
No migrations were applied. The database is already up to date.
info: Microsoft.EntityFrameworkCore.Migrations[20405]
No migrations were applied. The database is already up to date.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.SerializableError'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.SerializableError'.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action RadzenPm.Controllers.ServerMethodsController.UploadLeistungsnachweise (server) in 443.7817ms
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action RadzenPm.Controllers.ServerMethodsController.UploadLeistungsnachweise (server) in 443.7817ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 474.3174ms 400 application/json; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 474.3174ms 400 application/json; charset=utf-8

The configuartion of the upload event is as follows:

Any help is greatly appreciated.

What happens when you debug the method? You can follow the debugging instructions and put a breakpoint in the method to see if it is hit.

The breakpoint is not hit at all.

I am attaching an application which runs as expected at my side and is based on the documentation article. Does it work as expected at your side? If yes, what could be different?

upload.zip (24.3 KB)