I use CakeResponse::file() to let users download a file, as described here.
https://book.cakephp.org/2.0/en/controllers/request-response.html#cake-response-file
However, I noticed it works fine in Chrome, IE, Opera, etc., except Firefox. Just nothing happens in Firefox.
$this->response->file( $filepath, [
'name' => $filename,
'download' => true,
] );
return $this->response;
My controller’s code is essentially like this. It seems file type is irrelevant. Is there any way to fix this for Firefox?