[Bug]: MudExUploadEdit totally breaks application.
See original GitHub issueContact Details
No response
What happened?
MudBlazor: 6.8.0 Ex: 1.7.64
When I try to upload files (or even select them), server freezes and after some time this happens:
It happens always besides when I try to upload this one file, but even it breaks everything:
It saves same way then:
My code:
<MudExUploadEdit @bind-UploadRequests="files" MimeTypes="@mimeTypes" T="UploadableFile" Style="height: 400px; max-height: 400px; width: 800px" AllowMultiple="true" />
<MudButton OnClick="@UploadFiles">upload</MudButton>
@code {
private string[] mimeTypes =
{
"image/*"
};
IList<UploadableFile> files;
private async Task UploadFiles()
{
string fileStorage = Configuration.GetValue<string>("FileStorage")!;
foreach (var file in files)
{
Directory.CreateDirectory(Path.Combine(fileStorage, "CARD"));
string newName = Path.GetRandomFileName();
string newFileName = Path.ChangeExtension(newName, Path.GetExtension(file.FileName));
string path = Path.Combine(fileStorage, "CARD", newFileName);
await File.WriteAllBytesAsync(path, file.Data);
}
}
Edit: I managed to upload one webp file too somehow, but others don’t work.
Expected Behavior
To not freeze
Screenshots
No response
What browser are you using?
Chrome
Sample Solution
No response
Pull Request
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 2 months ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
fgilde/MudBlazor.Extensions
MudExUploadEdit. This component provides multi-file upload functionality, with features like duplicate checks, max size, specific allowed content types, max ...
Read more >MudBlazor.Extensions 1.7.47
MudBlazor.Extensions. MudBlazor.Extensions is a small extension for MudBlazor from https://mudblazor.com/ · Running Sample Application (Azure)
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wow thanks!!! Yes, now any file (or multiple files) can be uploaded without the bug occurring. The library is totally mind-blowing ❤️
I will have a look after vacation. Looks like wrong jsruntime is used. But I will fix it. 👍