We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfcadc3 commit 9c89ebbCopy full SHA for 9c89ebb
1 file changed
user_guide_src/source/outgoing/response.rst
@@ -92,13 +92,16 @@ Example::
92
93
$data = 'Here is some text!';
94
$name = 'mytext.txt';
95
- $response->download($name, $data);
+ return $response->download($name, $data);
96
97
If you want to download an existing file from your server you'll need to
98
do the following::
99
100
// Contents of photo.jpg will be automatically read
101
- $response->download('/path/to/photo.jpg', NULL);
+ return $response->download('/path/to/photo.jpg', NULL);
102
+
103
+.. note:: The response object MUST be returned for the download to be sent to the client. This allows the response
104
+ to be passed through all **after** filters before being sent to the client.
105
106
HTTP Caching
107
============
0 commit comments