I am using Blazor Server-Side and want to upload some files. I don't need any progress bar or so and only want to upload the files when the EditForm
is submitted. The popular solutions I found until now (Synfusion Blazor File Upload, Steve Sandersons File Upload) upload files once a file is selected, not on the EditForm
submit. Can't I just use input type="file"
in HTML for my simple case? How exactly would I do that with an EditForm
and how would I receive the file on the server side?
Steve Sandersons File Upload works, in
void HandleFileSelected(IFileListEntry[] files)
{
// Do something with the files, e.g., read them
}
simply store the files
are and access IFileListEntry.Data
when the form is submitted. No need to read the stream immediately in HandleFileSelected
.