fullstackhero / blazor-starter-kit

Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
MIT License
3.5k stars 737 forks source link

Uploading Document #306

Open G-Dassel opened 3 years ago

G-Dassel commented 3 years ago

When uploading documents, the size of a file is limited.

How to expand the size in BlazorHero?

MikaelHild commented 3 years ago

OpenReadStream enforces a maximum size in bytes of its Stream. Reading one file or multiple files larger than 512,000 bytes (500 KB) results in an exception. This limit prevents developers from accidentally reading large files in to memory. The maxAllowedSize parameter of OpenReadStream can be used to specify a larger size if required.

https://docs.microsoft.com/en-us/aspnet/core/blazor/file-uploads?view=aspnetcore-5.0&pivots=webassembly

You can maybe change the implementation in the Client/Pages/Misc/AddEditDocumentModal.razor.cs

G-Dassel commented 3 years ago

Thank you for pointing this out, but I knew it. I have now implemented Carl Franklin's FileChunk solution in BlazorHero. Now there is no longer any limit to the file size.

https://youtu.be/bQ6D4VFMxc4

yadoy666 commented 3 years ago

@G-Dassel Hi, can you share how to implement remove file size limitation on BlazorHero. I think blazorhero user need this feature too.