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