Merge pull request 'Add report logos and configurable folder scan depth' (#2) from feat/report-logos-and-scan-depth into main
Reviewed-on: #2
This commit is contained in:
@@ -25,4 +25,13 @@ public class WebExportService
|
||||
var bytes = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false).GetBytes(content);
|
||||
await _js.InvokeVoidAsync("sptb.downloadFile", fileName, "text/html;charset=utf-8", Convert.ToBase64String(bytes));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads pre-encoded bytes (e.g. a ZIP or a merged report produced by
|
||||
/// <see cref="ReportMergeHelper"/>) with an explicit MIME type.
|
||||
/// </summary>
|
||||
public async Task DownloadBytesAsync(byte[] content, string fileName, string mime)
|
||||
{
|
||||
await _js.InvokeVoidAsync("sptb.downloadFile", fileName, mime, Convert.ToBase64String(content));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user