-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IEnumerable<IFormFile> is not correctly binding #1967
Comments
Hi, this should work just fine. I have create a small sample with a static file here. |
Hi, Thank for your help and to have taken the time to do a repository. Let me know if you have questions :) |
Indeed, does not work, even with nested formdata. I updated the sample. It works fine with normal nested properties, not for nested files though. I suggest you to move that issue to the MVC Repository. |
Thanks @alsami, I created a new issue on MVC Repository. (aspnet/Mvc#8527) |
An issue has been found: |
Hi,
I have an Issue when I try to upload Files from my Angular 6 app to .net core web api.
Here is my C# classes:
My C# Controller:
As you can see Files are null.
But if I look in the request:
With more details:
As we can see the Files are correctly sent to the server, in the name we can see that there are supposed to be correctly bind to the DTO which is not the case.
I read here: aspnet/Mvc#7719 that It s recommended to use IFormCollection, so yes, I can see all the Files uploaded, but they are all in one property called "Files" instead of being linked to SampleDetailsDto or ChildSampleDto.
Did you notice this bug too? Did you find a way to patch it?
The text was updated successfully, but these errors were encountered: