Enable JS Interop Streaming for large objects in Blazor Server
mainIn Blazor Server, JS Interop calls are limited by the SignalR message size (default 32KB). To store or retrieve objects larger than this, use the streaming implementation.
- Register the streaming service:
services.AddBlazoredLocalStorageStreaming(); - Add the required JavaScript file to your
_App.razor:<script src="_content/Blazored.LocalStorage/Blazored.LocalStorage.js"></script>
public void ConfigureServices(IServiceCollection services)
{
services.AddBlazoredLocalStorageStreaming();
}