PageSourceSearch

https://flnk.it/js/file-download.11ohiyq0fp.js

js flnk.it collected 2026-09-24 09:06:51 UTC 728 bytes, 16 lines download raw bytes

1// Tiny helper for triggering a file download from a base64 payload.
2// Usage from Blazor: await JS.InvokeVoidAsync("downloadFile", "file.json", "application/json", base64);
3window.downloadFile = function (fileName, contentType, base64) {
4    const binary = atob(base64);
5    const bytes = new Uint8Array(binary.length);
6    for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
7    const blob = new Blob([bytes], { type: contentType });
8    const url = URL.createObjectURL(blob);
9    const a = document.createElement('a');
10    a.href = url;
11    a.download = fileName;
12    document.body.appendChild(a);
13    a.click();
14    document.body.removeChild(a);
15    setTimeout(() => URL.revokeObjectURL(url), 1000);
16};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.