microsoft / kiota-typescript

TypeScript libraries for Kiota-generated API clients.
https://aka.ms/kiota/docs
MIT License
32 stars 25 forks source link

MultiPart Request Error #1068

Open p30arena opened 4 months ago

p30arena commented 4 months ago

The MultiPart body is malformed, the string value contains an additional \r\n and the server doesn't accept it when the values are validated. Also, when uploading a file, "filename" is required by Django, but there is no way to provide additional keys and values to the message part.

baywet commented 4 months ago

Hi @p30arena Thanks for using kiota and for reporting that. I can see you've already started a PR, so I'll head over there to provide feedback.

bugproof commented 1 month ago

Same problem with ASP.NET Core and all the other web frameworks I guess... IFormFile is null and server doesn't accept it. I wasted 1+ hour looking for the solution and it was kiota serialization code fault. This bug is critical as it completely makes kiota clients useless for file uploads. I just used FormData and fetch as a workaround and much simpler too...