You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to use the ``gridfs`` driver in ``config/filesystems.php``:
34
35
35
36
.. code-block:: php
@@ -38,14 +39,11 @@ to use the ``gridfs`` driver in ``config/filesystems.php``:
38
39
'gridfs' => [
39
40
'driver' => 'gridfs',
40
41
'connection' => 'mongodb',
41
-
'database' => 'files',
42
-
'bucket' => 'fs',
43
-
'prefix' => '',
44
-
'read-only' => false,
45
-
'throw' => false,
46
42
],
47
43
],
48
44
45
+
You can configure the disk the following settings in ``config/filesystems.php``:
46
+
49
47
.. list-table::
50
48
:header-rows: 1
51
49
:widths: 25 75
@@ -60,10 +58,10 @@ to use the ``gridfs`` driver in ``config/filesystems.php``:
60
58
- The database connection used to store jobs. It must be a ``mongodb`` connection. The driver uses the default connection if a connection is not specified.
61
59
62
60
* - ``database``
63
-
- Name of the MongoDB database fot the GridFS bucket. Use the database of the connection if not specified.
61
+
- Name of the MongoDB database for the GridFS bucket. The driver uses the database of the connection if a database is not specified.
64
62
65
63
* - ``bucket``
66
-
- Name of the GridFS bucket. A database can contain multiple buckets identified by their name. Defaults to ``fs``.
64
+
- Name or instance of the GridFS bucket. A database can contain multiple buckets identified by their name. Defaults to ``fs``.
67
65
68
66
* - ``prefix``
69
67
- Specifies a prefix for the name of the files that are stored in the bucket. Using a distinct bucket is recommended
@@ -74,11 +72,11 @@ to use the ``gridfs`` driver in ``config/filesystems.php``:
74
72
depending on the configuration of ``throw``. Defaults to ``false``.
75
73
76
74
* - ``throw``
77
-
- If ``true``, exceptions are thrown when an operation cannot be performed. Defaults to ``false``, the operations
78
-
return ``true`` in case of succes, ``false`` in case of error.
75
+
- If ``true``, exceptions are thrown when an operation cannot be performed. If ``false``,
76
+
operations return ``true`` on success and ``false`` on error. Defaults to ``false``.
79
77
80
-
If you have specific requirements, you can use a factory or a service name to define the bucket. The options
81
-
``connection`` and ``database`` are ignored when a ``MongoDB\GridFS\Bucket`` is provided:
78
+
You can also use a factory or a service name to create an instance of ``MongoDB\GridFS\Bucket``.
79
+
In this case, the options ``connection`` and ``database`` are ignored:
82
80
83
81
.. code-block:: php
84
82
@@ -102,9 +100,9 @@ If you have specific requirements, you can use a factory or a service name to de
102
100
Usage
103
101
-----
104
102
105
-
The benefits of using Laravel File Storage facade, is that it provides a common
106
-
interface for all the supported file systems. Use the ``gridfs`` disk in the
107
-
same way as the ``local`` disk.
103
+
A benefit of using Laravel Filesystem is that it provides a common interface
104
+
for all the supported file systems. You can use the ``gridfs`` disk in the same
105
+
way as the ``local`` disk.
108
106
109
107
.. code-block:: php
110
108
@@ -117,22 +115,28 @@ same way as the ``local`` disk.
0 commit comments