8000 Merge pull request #3975 from WybrenKoelmans/binaryresponse-delete-fi… · symfony/symfony-docs@2758e79 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2758e79

Browse files
committed
Merge pull request #3975 from WybrenKoelmans/binaryresponse-delete-file-after-send
[HttpFoundation] Added a switch to delete file after the response is send
2 parents 3f92d5f + abda29b commit 2758e79

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/http_foundation/introduction.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,13 @@ You can still set the ``Content-Type`` of the sent file, or change its ``Content
515515
'filename.txt'
516516
);
517517

518+
.. versionadded:: 2.6
519+
The ``deleteFileAfterSend()`` method was introduced in Symfony 2.6.
520+
521+
It is possible to delete the file after the request is send with the
522+
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
523+
Please note that this will not work when the ``X-Sendfile`` header is set.
524+
518525
.. _component-http-foundation-json-response:
519526

520527
Creating a JSON Response

0 commit comments

Comments
 (0)
0