A Blazor library for downloading files directly from C# to the browser without JavaScript dependencies.
BlazorDownloadFile is a .NET library that enables downloading files directly from C# code to the user's browser in Blazor applications. It solves the problem of client-side file generation and download without requiring JavaScript libraries or complex interop. The library provides a clean C# API for creating files from various data sources like streams, byte arrays, and text.
Blazor developers who need to generate and download files on the client-side, particularly those building applications that create reports, exports, or generated documents directly in the browser.
Developers choose BlazorDownloadFile because it provides a pure C# solution for file downloads, eliminating JavaScript dependencies while offering robust features like buffer management, progress tracking, and support for large files. It integrates seamlessly with Blazor's dependency injection and follows .NET patterns.
Blazor download files to the browser from c# without any javascript library reference or dependency.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables file downloads entirely from C# code, eliminating the need for custom JavaScript interop, as highlighted in the GitHub description.
Supports downloading from base64 strings, byte arrays, streams, and text with encoding, providing flexibility for various data types.
Includes advanced buffer systems with methods to add, merge, and clear buffers, handling large files efficiently as described in the README.
Offers configurable progress tracking with buffer size options, enhancing user experience during large file transfers.
Built-in cancellation tokens and timeout options ensure robust asynchronous operations, detailed in the method overloads.
The README admits that streams perform slower than base64 or byte arrays due to conversion overhead, impacting efficiency for stream-based data.
With over 50 overloaded methods, the API can be overwhelming and error-prone, especially for simple download scenarios.
Despite being marketed as pure C#, it requires a manual JavaScript script for Content-Security-Policy compliance, contradicting the minimal JS claim.
Subject to browser-specific blob size limits and SignalR buffer restrictions in Blazor Server, as noted in the performance considerations section.