MatFileUpload makes site unresponsive and files ram when used with files bigger than 50 mb
Describe the bug
When we MatFileUpload is used like in the example page (https://www.matblazor.com/FileUpload) our app stops reacting to anything and the ram usage of chrome keeps growing if we try to upload filze bigger than a few MB.
The problem seems to be the line await file.WriteToStreamAsync(stream);
This doesnt happen on the example site itself but when we use the code from there it happens for us. The only difference im aware of is that we use WebAssembly and the example site uses ServerSide.
Edit: Confirmed this to only happen with WebAssembly. ServerSide works fine.
To Reproduce Steps to reproduce the behavior:
- Use BlazorWebAssmebly
- Use MatFileUpload
- Use the following code for the eventhandler
private async Task OnFilesChangedHandler2(IMatFileUploadEntry[] files) { using var stream = new MemoryStream(); await files[0].WriteToStreamAsync(stream); }
Expected behavior Read the content of a file bigger than 50 mb without the app freezing.
@mdeeken ,
Thanks for the report! Would you mind opening a PR for this issue?