ProcessController: improve download link

This commit is contained in:
Thomas Gelf 2017-01-03 11:43:22 +01:00
parent f16715814f
commit e4043d94a2

View file

@ -375,18 +375,17 @@ class ProcessController extends Controller
public function downloadAction()
{
$bp = $this->loadModifiedBpConfig();
header(
$response = $this->getResponse();
$response->setHeader(
'Content-Disposition',
sprintf(
'Content-Disposition: attachment; filename="%s.conf";',
'attachment; filename="%s.conf";',
$bp->getName()
)
);
header('Content-Type: text/plain');
$response->setHeader('Content-Type', 'text/plain');
echo $this->storage()->render($bp);
// Didn't have time to lookup how to correctly disable our renderers
// TODO: no exit :)
$this->doNotRender();
}