Downloads a file by creating a temporary link element with the given file data and metadata and then simulating a click event to trigger a download.
The Matterway SDK context.
The SdkFile object containing the file data and metadata to be downloaded.
Promise of void
const file = { name: 'example.txt', data: 'SGVsbG8gV29ybGQh', type: 'text/plain' };await downloadFile(context, file); Copy
const file = { name: 'example.txt', data: 'SGVsbG8gV29ybGQh', type: 'text/plain' };await downloadFile(context, file);
Generated using TypeDoc
Downloads a file by creating a temporary link element with the given file data and metadata and then simulating a click event to trigger a download.