Skip to content

Kirby 6.0.0

$file->download()

Automatically sends all needed headers for the file to be downloaded and echos the file's content

$file->download(string|null $filename = null): string

Parameters

Name Type Default Description
$filename stringornull null Optional filename for the download

Return type

string

Parent class

Kirby\Filesystem\File