Function: downloadByBlob()
ts
function downloadByBlob(dataStream, fileName?): void;Downloads a file from a Blob object by creating a temporary object URL and clicking a link with a download attribute.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
dataStream | BlobPart | undefined | The data to download as a Blob object. |
fileName | string | 'unknown' | The name to use for the downloaded file. Defaults to 'unknown'. |
Returns
void
Example
ts
downloadByBlob('hello,world', 'export')
console.log('triggered')Since
1.0.0