core-bundle/src/Resources/contao/library/Contao/File.php
public function sendToBrowser($filename='', $inline=false)
	{
		$response = new BinaryFileResponse($this->strRootDir . '/' . $this->strFile);

		$response->setContentDisposition
		(
			$inline ? ResponseHeaderBag::DISPOSITION_INLINE : ResponseHeaderBag::DISPOSITION_ATTACHMENT,
			$filename,
			Utf8::toAscii($this->basename)
		);

		$response->headers->addCacheControlDirective('must-revalidate');
		$response->headers->addCacheControlDirective('post-check', 0);
		$response->headers->addCacheControlDirective('pre-check', 0);
		$response->headers->set('Connection', 'close');

		throw new ResponseException($response);
	}
public function sendToBrowser($filename='', $inline=false)
	{
		$response = new BinaryFileResponse($this->strRootDir . '/' . $this->strFile);

		$response->setContentDisposition
		(
			$inline ? ResponseHeaderBag::DISPOSITION_INLINE : ResponseHeaderBag::DISPOSITION_ATTACHMENT,
			$filename,
			Utf8::toAscii($this->basename)
		);

		$response->headers->addCacheControlDirective('must-revalidate');
		$response->headers->addCacheControlDirective('post-check', 0);
		$response->headers->addCacheControlDirective('pre-check', 0);
		$response->headers->set('Connection', 'close');

		throw new ResponseException($response);
	}
Send the file to the browser

@param string  $filename An optional filename
@param boolean $inline   Show the file in the browser instead of opening the download dialog

@throws ResponseException