@@ -27,7 +27,7 @@ and reassemble those files when retrieving them. The driver's implementation of
27
27
GridFS is an abstraction that manages the operations and organization of
28
28
the file storage.
29
29
30
- Use GridFS if the size of your files exceeds the BSON document
30
+ Use GridFS if the size of any of your files exceeds the BSON document
31
31
size limit of 16 MB. For more detailed information about whether GridFS is
32
32
suitable for your use case, see :manual:`GridFS </core/gridfs>` in the
33
33
{+mdb-server+} manual.
@@ -43,8 +43,8 @@ defined in the GridFS specification:
43
43
- ``chunks``: Stores the binary file chunks
44
44
- ``files``: Stores the file metadata
45
45
46
- The driver creates the GridFS bucket, if it doesn't exist, when you first
47
- write data to it. The bucket contains the preceding collections
46
+ The driver creates the GridFS bucket, if it doesn't already exist, when you first
47
+ write data to it. The bucket contains the ``chunks`` and ``files`` collections
48
48
prefixed with the default bucket name ``fs``, unless you specify a different
49
49
name. To ensure efficient retrieval of the files and related metadata, the driver
50
50
creates an index on each collection. The driver ensures that these indexes exist
@@ -97,7 +97,7 @@ Customize the Bucket
97
97
~~~~~~~~~~~~~~~~~~~~
98
98
99
99
You can customize the GridFS bucket configuration by passing an instance
100
- of the ``GridFSBucketOptions class `` class to
100
+ of the ``GridFSBucketOptions`` class to
101
101
the ``GridFSBucket()`` constructor. The following table describes the properties in the
102
102
``GridFSBucketOptions`` class:
103
103
@@ -154,7 +154,7 @@ You can upload files to a GridFS bucket by using the following methods:
154
154
- ``UploadFromStreamAsync()`` or ``UploadFromStream()``: Uploads the contents of an existing
155
155
stream to a GridFS file
156
156
157
- The following sections describe these methods in more detail .
157
+ The following sections describe how to use these methods .
158
158
159
159
.. _gridfs-open-upload-stream:
160
160
@@ -182,10 +182,10 @@ stream for a given file name. These methods accept the following parameters:
182
182
|
183
183
| **Data type**: `CancellationToken <https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken>`__
184
184
185
- The following code example demonstrates how to open an upload stream by performing the
185
+ This code example demonstrates how to open an upload stream by performing the
186
186
following steps:
187
187
188
- - Calls the ``OpenUploadStream()`` method to open a writable GridFS stream for a new file
188
+ - Calls the ``OpenUploadStream()`` method to open a writable GridFS stream for a file
189
189
named ``"my_file"``
190
190
- Calls the ``Write()`` method to write data to ``my_file``
191
191
- Calls the ``Close()`` method to close the stream that points to ``my_file``
@@ -223,7 +223,7 @@ method. The ``GridFSUploadOptions`` class contains the following properties:
223
223
- Description
224
224
* - ``BatchSize``
225
225
- | The number of chunks to upload in each batch. The default value is ``16777216``
226
- divided by the value of the following property, ``ChunkSizeBytes``.
226
+ divided by the value of the ``ChunkSizeBytes`` property .
227
227
|
228
228
| **Data type**: ``int?``
229
229
@@ -304,7 +304,7 @@ contents of a stream to a new GridFS file. These methods accept the following pa
304
304
|
305
305
| **Data type**: `CancellationToken <https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken>`__
306
306
307
- The following code example demonstrates how to open an upload stream by performing the
307
+ This code example demonstrates how to open an upload stream by performing the
308
308
following steps:
309
309
310
310
- Opens a file located at ``/path/to/input_file`` as a stream in binary read mode
@@ -550,7 +550,7 @@ on your ``GridFSBucket`` instance. These methods accept the following parameters
550
550
The following code example shows how to retrieve and print file metadata
551
551
from files in a GridFS bucket. The ``Find()`` method returns an
552
552
``IAsyncCursor<GridFSFileInfo>`` instance from
553
- which you can access the results.It uses a ``foreach`` loop to iterate through
553
+ which you can access the results. It uses a ``foreach`` loop to iterate through
554
554
the returned cursor and display the contents of the files uploaded in the
555
555
:ref:`gridfs-upload-files` examples.
556
556
0 commit comments