Closed janjanech closed 1 year ago
Hey Jan,
This is definitely a problem that I have faced before.
You can read more about it on the demo page/documentation for Blazor.FileAPI.
Another nice example of how to solve this is in the demo app of Blazor.Stream where we use CopyToAsync
on the stream accessible from a File
to copy in chunks.
Let me know if you want more info on this issue.
Default setting for message size used by SignalR is 32768 and as such it is largest chunk of data possible to be transferred from JavaScript to Blazor Server app. It seems that this library is transferring whole file content in one chunk and attempt to load larger files ends with exception
InvalidDataException: The maximum message size of 32768B was exceeded
. This issue can be fixed by settingMaximumReceiveMessageSize
option for SignalR, but it would be great if this library streams file content in chunks instead to enable opening files of unlimited size.