InputFile in Blazor SSR #51980
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Pillar: Complete Blazor Web
Is there an existing issue for this?
Describe the bug
When submitting a form file in Blazor SSR (no interactivity), it seems that it requires the Enchance attribute on the EditForm.
Why is that, and should this be documented somewhere?
And is it possible to use InputFile component for this, only regular seems to work?
Expected Behavior
I would expect that the EditForm with file submit works without the Enchance attribute,
and that I could use InputFile component in a Blazor SSR page.
I would also expect this documentation to be updated for these scenarios:
https://learn.microsoft.com/en-us/aspnet/core/blazor/file-uploads?view=aspnetcore-8.0
Steps To Reproduce
Create a new Blazor 8 SSR project (no interactivity) and put this code on Home page:
The submit fails saying that the 'NewCustomer?.File' is null.
Adding the Enchance attribute makes this work.
Exceptions (if any)
No response
.NET Version
8.0.100-rc.2.23502.2
Anything else?
No response
The text was updated successfully, but these errors were encountered: