BlazorDownloadFileFast 1.0.0.1
Blazor.DownloadFileFast
Fast download from files to the browser from Blazor without any javascript library reference or dependency.
BlazorDownloadFileFast is the solution to saving files on the client-side, and is perfect for web apps that generates files on the client.
When using this project in a NET 5 (and up) Blazor WebAssembly project, there is an additional speed increase. Read the blog post mentioned from Gérald Barré in the credits.
Usage
Register
builder.Services.AddBlazorDownloadFile();
Inject in code-behind
[Inject]
public IBlazorDownloadFileService BlazorDownloadFileService { get; set; }
Use in your code
byte[] bytes = ...;
await BlazorDownloadFileService.DownloadFileAsync("example.txt", bytes);
Credits
- The idea and code from this project is based on Generating and efficiently exporting a file in a Blazor WebAssembly application
- For resolving the Content-Type based on the file extension, this code is used: MimeTypeMap
- This project is inspired by BlazorDownloadFile
Demo
- https://wonderful-glacier-0cf7ba303.4.azurestaticapps.net
- https://stefh.github.io/Blazor.DownloadFileFast/
Sponsors
Entity Framework Extensions and Dapper Plus are major sponsors and proud to contribute to the development of Blazor.DownloadFileFast.
No packages depend on BlazorDownloadFileFast.
.NET 5.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
- Microsoft.JSInterop (>= 5.0.0)
.NET 6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.JSInterop (>= 6.0.0)
.NET 7.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.JSInterop (>= 7.0.0)
.NET 8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.JSInterop (>= 8.0.0)
.NET 9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.JSInterop (>= 9.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.0.1 | 1 | 10/1/2026 |

