Skip to content

Commit e67b592

Browse files
committed
Add note about prefix with gridfs api
1 parent e633d9a commit e67b592

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/filesystems.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ You can configure the disk the following settings in ``config/filesystems.php``:
7070

7171
* - ``prefix``
7272
- Specifies a prefix for the name of the files that are stored in the bucket. Using a distinct bucket is recommended
73-
in order to store the files in a different collection.
73+
in order to store the files in a different collection, instead of using a prefix.
74+
The prefix should not start with a leading slash ``/``.
7475

7576
* - ``read-only``
7677
- If ``true``, writing to the GridFS bucket is disabled. Write operations will return ``false`` or throw exceptions
@@ -151,3 +152,8 @@ if you need to work with revisions, as shown in the following code:
151152

152153
// Download the last but one version of a file
153154
$bucket->openDownloadStreamByName('hello.txt', ['revision' => -2])
155+
156+
.. note::
157+
158+
If you use a prefix the Filesystem component, you will have to handle it
159+
by yourself when using the GridFS API directly.

0 commit comments

Comments
 (0)