Skip to content

Commit 676c75f

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Adding information about empty files sent using BinaryFileResponse.
2 parents 2255de7 + 141caa2 commit 676c75f

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
@@ -519,6 +519,13 @@ It is possible to delete the file after the request is sent with the
519519
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
520520
Please note that this will not work when the ``X-Sendfile`` header is set.
521521

522+
.. note::
523+
524+
If you *just* created the file during this same request, the file *may* be sent
525+
without any content. This may be due to cached file stats that return zero for
526+
the size of the file. To fix this issue, call ``clearstatcache(false, $file)``
527+
with the path to the binary file.
528+
522529
.. _component-http-foundation-json-response:
523530

524531
Creating a JSON Response

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy