Closed janatjak closed 5 years ago
Thanks for contacting us, @janatjak. @dougbu, is this the same as: https://github.com/aspnet/Mvc/issues/8723 ?
Yes, this matches #8723: Model binding system will iterate to int.MaxValue
if model is a collection of a complex type and the complex type has a greedy binding source for one or more properties. The binding source for IFormFile
is greedy.
@mkArtakMSFT I suggest tracking this problem in #8723 and closing #8782 (this one) as a dupe. Agreed?
Is this a Bug or Feature request?:
Bug
Steps to reproduce (preferably a link to a GitHub repo with a repro project):
Posting form with OneToMany structure containing IFormFile property e.g.:
dotnet model binder jumps to never ending loop and generate new array items
Translations[0].UploadedFile
,Translations[1].UploadedFile
, ...Translations[....never ending].UploadedFile
,Description of the problem:
Problem depends on commit 47d6d4e82cf94f3138a413571cfca6930d2018b9. https://github.com/aspnet/Mvc/blob/master/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/Binders/FormFileModelBinder.cs#L89
Version of
Microsoft.AspNetCore.Mvc
orMicrosoft.AspNetCore.App
orMicrosoft.AspNetCore.All
:Microsoft.AspNetCore.App 2.2.0