[FromForm] isn't available in .NET 6 for minimal API.

Is there any way to make a MapPost() receive parameters from encoded form ?
7 Replies
Pobiega
Pobiega2y ago
Stack Overflow
.NET 6 Minimal API and multipart/form-data
Using the .NET 6 Minimal API, I'm trying to handle multipart/form-data in the POST method. However, with the following code: app.MapPost("/tickets", async (IFreshdeskApiService s, [FromFo...
Patrick
Patrick2y ago
Isn’t supported until .NET 7
Pobiega
Pobiega2y ago
Pobiega
Pobiega2y ago
There are workarounds listed in that SO post
nael4slayer
nael4slayer2y ago
Should I use the preview .NET 7 ?
Patrick
Patrick2y ago
If you’re not doing anything serious you can Changes might still happen until November since it’s not RC 🙂
nael4slayer
nael4slayer2y ago
Nothing serious at all 🙂