Value
Constants::CALLBACK_TYPE_FILE = 3
Semantics
Every action callback returns array( $callback_type, $payload ) from execute_callback(). With CALLBACK_TYPE_FILE:
The payload is a file: the dispatcher responds with {type:'file', filename, data(base64), target, application_type} and the frontend triggers a download.
Typical usage
File downloads such as get_datatable_as_file (Excel export) or get_pdf.
public function execute_callback(): array {
return array( Constants::CALLBACK_TYPE_FILE, $payload );
}