CakePHP2 CakeResponse::file() does not start download in Firefox

I use CakeResponse::file() to let users download a file, as described here.

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?