Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/tutorial/gridfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ To open a download stream and read from it:
$bucket = (new MongoDB\Client)->example->selectGridFSBucket();

$stream = $bucket->openDownloadStream($fileId);
$contents = file_get_contents($stream);
$contents = stream_get_contents($stream);

To download the file all at once and write it to an writable stream:
To download the file all at once and write it to a writable stream:

.. code-block:: php

Expand Down Expand Up @@ -136,7 +136,7 @@ particular file:
$bucket = (new MongoDB\Client)->example->selectGridFSBucket();

$stream = $bucket->openDownloadStreamByName('my-file.txt', ['revision' => 0]);
$contents = file_get_contents($stream);
$contents = stream_get_contents($stream);

Deleting Files
--------------
Expand Down