System:File:download

From Aspen Documentation

Initiates a download of a file. The file contents are sent as a download attachment with the following headers:

header( "Content-type: ".$this->file_type );
header( "Content-Length: ".$this->file_size );
header( "Content-Disposition: attachment; filename=" . $this->file_path );
header( "Content-Description: Data Download" );

Since 1.0

Contents

Arguments

void download ()

Returns

This function does not return any values.

Notes

  • Note.

Examples

Example:

$this->APP->file->useFile('/path/to/file.xml');
$this->APP->file->download();