hello I have a problem I am working with blazor and aspnet core, I already have a component that uploads files and when uploading it shows a table with the data of the file I uploaded, but I want that when uploading a file it shows me only the name and a progress bar while the file loads but I don't know how to do this.
this is my code to upload files:
<h3 class="text-center">Subir Archivo</h3>
<div class="input-group col-md-4">
<div class="input-group-prepend">
<span class="input-group-text"></span>
</div>
<div class="custom-file">
<InputFile class="custom-file-input" id="inputGroupFile01" lang="es" multiple OnChange="HandleSelection" />
<label class="custom-file-label" for="inputGroupFile01">Seleccionar Archivo...</label>
</div>
</div>
<br />
@if (selectedFiles != null)
{
<table class="table table-hover text-center">
<thead>
<tr>
<th>Nombre</th>
<th>Tamaño en bytes</th>
<th>Fecha de Modificación</th>
<th>Tipo de Archivo</th>
</tr>
</thead>
<tbody>
@foreach (var file in selectedFiles)
{
<tr>
<td>@file.Name</td>
<td>@file.Size</td>
<td>@file.LastModified</td>
<td>@file.Type</td>
</tr>
}
</tbody>
</table>
}
@code {
IFileListEntry[] selectedFiles;
async Task HandleSelection(IFileListEntry[] files)
{
selectedFiles = files;
foreach (var selectedFiles in files)
{
if (files != null)
{
var ms = new MemoryStream();
await selectedFiles.Data.CopyToAsync(ms);
var content = new MultipartFormDataContent {
{ new ByteArrayContent(ms.GetBuffer()), "\"Upload\"", selectedFiles.Name } };
await Http.PostAsync("Upload", content);
}
}
}
}
I want something like this but I don't know how easy it is to do this

