-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
InputFile in Blazor SSR #50614
Comments
This is being potentially addressed as part of #50537 |
Closing as a dupe of #49526 |
@mkArtakMSFT @javiercn This was closed as a possible duplicate, but in RC 2 I still can't bind a Blazor SSR page input type="file" to a InputFile property, how should this be done? Here is some sample code for the Home page:
|
@Markz878 If you're still hitting issues with this, could you please open a new GitHub issue so that we can investigate? |
@danroth27 I created this: #51980 BUT HERE IS A PRIORITY TICKET: 51584 I finally got my team excited about using Blazor with SSR, but the bad UX with WASM pages ruins all that. Imagine if Github first showed page content, then cleared it, and then showed it again. Really annoying. I'm hopeful you will make the right decision, and thanks for the hard work so far. |
I get the file value null and I resolved by 2 changes:
|
Is there an existing issue for this?
Describe the bug
I'm trying to use InputFile component in a Blazor 8 Web app with only SSR.
I've tried binding the value to an IFormFile and IBrowserFile types, but get an error with both of them.
And the LoadFile method does not work obviously.
How are we supposed to use InputFile with only server side rendering?
Expected Behavior
I was hoping I could just put an IFormFile property (called File in this example) to my model and have this code in my form:
and on submit it would bind to the File property.
Steps To Reproduce
No response
Exceptions (if any)
With IFormFile the exception looks like this:
.NET Version
8.0.100-preview.7.23376.3
Anything else?
No response
The text was updated successfully, but these errors were encountered: