Blazor download files to the browser from c#.
This packages was inspired of blazor lacks of built-in binary data downloader.
This packages makes that posible with a little js interop.
Install-Package BlazorDownloadFile -Version 1.0.2
@using BlazorDownloadFile
services.AddBlazorDownloadFile();
<script src="_content/BlazorDownloadFile/blazorDownloadFile.js"></script>
[Inject] BlazorDownloadFileService BlazorDownloadFileService { get; set; }
BlazorDownloadFileService.DownloadFile(string fileName, string bytesBase64)
BlazorDownloadFileService.DownloadFile(string fileName, byte[] bytes)
BlazorDownloadFileService.DownloadFile(string fileName, Stream stream)
MIT