Appearance
Function: showDownloadFile()
ts
function showDownloadFile(ctx: Context, options: ShowDownloadFileOptions): Promise<void>;Defined in: src/file/offerFile.tsx:37
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The Matterway SDK context. |
options | ShowDownloadFileOptions | Additional options for the message and download button. |
Returns
Promise<void>
Promise of void
Deprecated
Shows a message to the user with a download button for the specified file.
Example
ts
const file = { name: 'example.txt', data: 'SGVsbG8gV29ybGQh', type: 'text/plain' };
const downloadButton = 'Download Now';
const options = { file, downloadButton };
await showDownloadFile(context, options);