If you are tracking the development of ASP.NET Core 5, you are probably aware that RC1 of the framework is now available. One of the additions for Blazor Server and Blazor WebAssembly is the InputFile component to deal with file uploads. In this article I am going to take a quick look at the InputFile component and discuss a possible file upload process for Blazor Server as well as Blazor WebAssembly (ASP.NET Core hosted) apps.

Blazor Server

First we will use the InputFile component in a Blazor Server app. So, create a new Blazor Server app using Visual Studio.

Then add a new Razor Component called FileUpload.razor into the Pages folder.

Then add the following markup in the FileUpload.razor file.

#blazor #blazor webassembly

Upload files using InputFile component in Blazor
49.70 GEEK