File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
components/http_foundation Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ abstracts the hard work behind a simple API::
449
449
Alternatively, if you are serving a static file, you can use a
450
450
:class: `Symfony\\ Component\\ HttpFoundation\\ BinaryFileResponse `::
451
451
452
- use Symfony\Component\HttpFoundation\BinaryFileResponse
452
+ use Symfony\Component\HttpFoundation\BinaryFileResponse;
453
453
454
454
$file = 'path/to/file.txt';
455
455
$response = new BinaryFileResponse($file);
@@ -465,7 +465,7 @@ if it should::
465
465
466
466
You can still set the ``Content-Type `` of the sent file, or change its ``Content-Disposition ``::
467
467
468
- $response->headers->set('Content-Type', 'text/plain')
468
+ $response->headers->set('Content-Type', 'text/plain');
469
469
$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'filename.txt');
470
470
471
471
.. _component-http-foundation-json-response :
You can’t perform that action at this time.
0 commit comments