You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2021. It is now read-only.
when choosing a file, I can see the file details. But reading the file just does not work.
I do not know what excactly does not work. There is no exception.
When trying this code in VisualStudio the process (not Visual Studio but the started process) crashes.
On my deployed machine this does not happen but it does not work anyway.
This is my code:
<BlazorInputFile.InputFile OnChange="HandleFileSelected" MaxMessageSize="99999999" />
@if (file != null)
{
<p>Name: @file.Name</p>
<p>Size in bytes: @file.Size</p>
<p>Last modified date: @file.LastModified.ToShortDateString()</p>
<p>Content type (not always supplied by the browser): @file.Type</p>
}
<p>@status</p>
@code {
IFileListEntry file;
string status;
async Task HandleFileSelected(IFileListEntry[] files)
{
file = files.FirstOrDefault();
if (file != null)
{
// Just load into .NET memory to show it can be done
// Alternatively it could be saved to disk, or parsed in memory, or similar
var ms = new MemoryStream();
await file.Data.CopyToAsync(ms);
status = $"Finished loading {file.Size} bytes from {file.Name}";
}
}
}
I can see the first part with the filename and file size (96353 bytes).
But the status is never shown.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
when choosing a file, I can see the file details. But reading the file just does not work.
I do not know what excactly does not work. There is no exception.
When trying this code in VisualStudio the process (not Visual Studio but the started process) crashes.
On my deployed machine this does not happen but it does not work anyway.
This is my code:
I can see the first part with the filename and file size (96353 bytes).
But the status is never shown.
The text was updated successfully, but these errors were encountered: