Skip to content

Function: showFileDownload()

ts
function showFileDownload(ctx: Context, options: ShowFileDownloadOptions): Promise<void>;

Defined in: src/file/offerMwFile.tsx:51

Experimental

Parameters

ParameterTypeDescription
ctxContextContext object.
optionsShowFileDownloadOptionsOptions for the message and download button.

Returns

Promise<void>

Resolves when the user dismisses the message.

Deprecated

Use showUI.fileDownload instead.

Show a message with a download button for a file.

Example

ts
const recipe = await mwFileFromDrive('/Documents/grandmas-cookies.pdf', 'application/pdf');
await showFileDownload(ctx, {
  file: recipe,
  downloadButton: 'Download Recipe',
  title: 'Your recipe is ready!',
});

Matterway Assistant SDK Documentation