From 67c944c962c22b2a81af4e973aade3aafe1e4733 Mon Sep 17 00:00:00 2001 From: LABCAT Date: Tue, 22 Oct 2019 15:18:03 +1300 Subject: [PATCH] Improvement to docs for send_file function --- src/Control/HTTPRequest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Control/HTTPRequest.php b/src/Control/HTTPRequest.php index c3d5da5e7..74ec00b16 100644 --- a/src/Control/HTTPRequest.php +++ b/src/Control/HTTPRequest.php @@ -468,6 +468,8 @@ class HTTPRequest implements ArrayAccess * Construct an HTTPResponse that will deliver a file to the client. * Caution: Since it requires $fileData to be passed as binary data (no stream support), * it's only advisable to send small files through this method. + * this function needs to called inside the controllers response, eg + * $this->setResponse(HTTPRequest::send_file('the content', 'filename.txt')); * * @static * @param $fileData