To upload a file in Blazor using C#, we need to create a form and use the httpClient to post the file to the web api endpoint. Here's an example:
134 chars5 lines
main.cs106 chars7 lines
main.cs395 chars16 lines
main.cs127 chars8 lines
And that's it! You should now be able to upload files from your Blazor app to your web api.
gistlibby LogSnag