File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ To open a download stream and read from it:
8787 $bucket = (new MongoDB\Client)->example->selectGridFSBucket();
8888
8989 $stream = $bucket->openDownloadStream($fileId);
90- $contents = file_get_contents ($stream);
90+ $contents = stream_get_contents ($stream);
9191
92- To download the file all at once and write it to an writable stream:
92+ To download the file all at once and write it to a writable stream:
9393
9494.. code-block:: php
9595
@@ -136,7 +136,7 @@ particular file:
136136 $bucket = (new MongoDB\Client)->example->selectGridFSBucket();
137137
138138 $stream = $bucket->openDownloadStreamByName('my-file.txt', ['revision' => 0]);
139- $contents = file_get_contents ($stream);
139+ $contents = stream_get_contents ($stream);
140140
141141Deleting Files
142142--------------
You can’t perform that action at this time.
0 commit comments