We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9569e2d + 676c75f commit b785d35Copy full SHA for b785d35
components/http_foundation/introduction.rst
@@ -519,6 +519,13 @@ It is possible to delete the file after the request is sent with the
519
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
520
Please note that this will not work when the ``X-Sendfile`` header is set.
521
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
529
.. _component-http-foundation-json-response:
530
531
Creating a JSON Response
0 commit comments