From abda29b0a6957bbb1418fa87254db0a080a7741d Mon Sep 17 00:00:00 2001 From: WybrenKoelmans Date: Fri, 4 Jul 2014 10:31:37 +0200 Subject: [PATCH] #11212 [HttpFoundation] Added a switch to delete file after the response is send --- components/http_foundation/introduction.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index 4db19238609..92034f4efe6 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -515,6 +515,13 @@ You can still set the ``Content-Type`` of the sent file, or change its ``Content 'filename.txt' ); +.. versionadded:: 2.6 + The ``deleteFileAfterSend()`` method was introduced in Symfony 2.6. + +It is possible to delete the file after the request is send with the +:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method. +Please note that this will not work when the ``X-Sendfile`` header is set. + .. _component-http-foundation-json-response: Creating a JSON Response