Checking the ASP.NET Core built-in formatters there seems to be no multipart formatter. Yet a multipart request is model bound, so there needs to be some kind of input formatter, that creates the key-value pairs, which are then model bound. Which formatter is that?
Asked
Active
Viewed 169 times
1 Answers
1
Model is bound during model binding. Model binder in its turn uses IValueProvider
to get values from request. There is FormValueProvider for multipart content, which in its turn gets values from FormValueProviderFactory provided by request.ReadFormAsync() call. Default implementation of HttpRequest
redirects the call to FormFeature's ReadFormAsync. So you can find all the logic for reading multipart content values there.

Alexander
- 9,104
- 1
- 17
- 41
-
thanks for that detailed answer, highly appreciated! – stefan.at.kotlin Feb 08 '21 at 19:01