Skip to main content

Page Action | File Download

Use page.download() to download a file to the user's device.

Learn more in the file download guide.

API reference

Function signature

page.download(
file: Buffer,
filename: string,
): void;

Parameters

file

required Buffer
The file content to download.

filename

required string
The name of the file to download.

Returns

void