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:
87
87
$bucket = (new MongoDB\Client)->example->selectGridFSBucket();
88
88
89
89
$stream = $bucket->openDownloadStream($fileId);
90
- $contents = file_get_contents ($stream);
90
+ $contents = stream_get_contents ($stream);
91
91
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:
93
93
94
94
.. code-block:: php
95
95
@@ -136,7 +136,7 @@ particular file:
136
136
$bucket = (new MongoDB\Client)->example->selectGridFSBucket();
137
137
138
138
$stream = $bucket->openDownloadStreamByName('my-file.txt', ['revision' => 0]);
139
- $contents = file_get_contents ($stream);
139
+ $contents = stream_get_contents ($stream);
140
140
141
141
Deleting Files
142
142
--------------
You can’t perform that action at this time.
0 commit comments