-
Notifications
You must be signed in to change notification settings - Fork 2.1k
File input no longer posting #5076
Comments
From @Tratcher on July 5, 2016 16:32 Is it in Request.Form.Files? |
From @MihaiBratulescu on July 5, 2016 16:55 @Tratcher Yes, I now see it's posting but not binding to the dictionary (IDictionary<string, IEnumerable>) from my model. |
From @MihaiBratulescu on July 5, 2016 17:3 Sorry I swear I wrote something else, my model is:
|
From @prilutskiy on July 5, 2016 23:14 @MihaiBratulescu, Do you have enctype attribute of the form set to multipart/form-data? |
From @MihaiBratulescu on July 6, 2016 13:17 @prilutskiy Yes, like I said it worked in RC2. I have the same problem on a different machine at home. |
I am looking at it now. |
Could you share how your raw request looks like?(ex: browser developer tools) I am not interested in the files being uploaded but the individual parts' headers(because for model binding purpose how the key names are important). So following is the model you are binding to? public class ScopeModel
{
public IDictionary<string, IEnumerable<IFormFile>> ZoneOfAnalysisFiles {get;set;}
....
} |
From @MihaiBratulescu on July 6, 2016 21:27 @kichalla not sure what you ask for but here is a more simple example that also does not work: Model:
View:
Controller:
As for the headers: Request URL:http://localhost:54821/Home/Upload 0File ------WebKitFormBoundaryB2Y9SIARh3WgqkPB 1File ------WebKitFormBoundaryB2Y9SIARh3WgqkPB 2File ------WebKitFormBoundaryB2Y9SIARh3WgqkPB-- |
Thanks! for the simple repro. cc @dougbu |
From @MihaiBratulescu on July 4, 2016 7:10
I have a few of these file inputs:
The keys get posted but not the files. In
Request.Form.Keys
theValue
keys are missing for the file inputs but if I change to text it's working all the sudden.This has been happening since I upgraded to RTM and worked fine in RC2.
My
project.json
:Is there a solution out there?
Copied from original issue: dotnet/aspnetcore#1631
The text was updated successfully, but these errors were encountered: