Send attachment/Download file from Symfony action
问题 I'm trying to deliver a CSV file through an action. The mime-type in the response still shows as text/html. Can someone help? Thanks //$this->setLayout(false); //$this->getUser()->shutdown(); //sfConfig::set('sf_web_debug', false); $response = $this->getContext()->getResponse(); $response = $this->getResponse(); $response->clearHttpHeaders(); $response->setHttpheader('Pragma: public', true); $response->addCacheControlHttpHeader('Cache-Control', 'must-revalidate'); $response->setContentType(