Hello, I trying to build an appwrite function in .net 7.0. Frontend is sending the formData with multipart file. Therefore, in the function, I need to convert the request body to IFormCollection body but I'm not able to do so. I need help here.
TL;DR
Developers in .net 7.0 trying to get IFormCollection from Context.Req.Body are encountering an InvalidCastException. To resolve this, consider using `Request.Form` to retrieve the form collection.
Abhishek
19 Mar, 2024, 18:47
TypeScript
System.InvalidCastException: Unable to cast objectoftype'System.String' to type'Microsoft.AspNetCore.Http.IFormCollection'. at DotNetRuntime.Handler.Main(RuntimeContextContext) in /usr/local/server/src/Index.cs:line 12 at DotNetRuntime.Program.Action(HttpRequest request) in /usr/local/server/src/Program.cs:line 193