This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
byte[]
model binder should prevent falling back to other binders when the type matches. #2456
Closed
Description
If the Model Type is IFormFile
or IEnumerable<IFormFile>
, even though we return a non null
ModelBindingResult
, in cases where the model is not set ( for example when there is no form body ),
it will result into a ModelBindingResult of null returned to the caller. This is because of
https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.Core/ModelBinding/CompositeModelBinder.cs#L107
Ideally FormFileModelBinder should behave like a greedy model binder.