Hi Christoph Weller
The behavior you’ve described aligns with the expected
functionality of the native InputFile component in Blazor. When a user selects
a file, the component stores the list of files locally and assigns an ID to
each file. Reading the file using file.OpenReadStream relies on the file’s
associated ID.
However, when a new file is selected, the InputFile
component replaces the previous files with the new ones. As a result, trying to
access the details of the last uploaded file may lead to an error, as the file
associated with the original ID may no longer exist.
It’s important to note that the Syncfusion Uploader also
follows a similar behavior to the native Blazor uploader in this regard.
To gain a deeper understanding of this functionality, you
can refer to the following blog post:
https://www.meziantou.net/uploading-multiple-files-to-using-inputfile-in-blazor.htm
To resolve the issue, you can either set AutoUpload
to true, which will automatically upload the first file upon selection,
or, if you need to set AutoUpload to false, you should ensure
that the first file is uploaded before browsing and selecting a second file.
Regards,
Yohapuja S