Skip to content

Commit ea27460

Browse files
mongoKartrustagir
andauthored
Apply suggestions from code review
Co-authored-by: Rea Rustagi <[email protected]>
1 parent 4132ad2 commit ea27460

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

source/fundamentals/crud/write-operations/insert.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ documents to a MongoDB collection by performing insert operations.
2525

2626
.. note:: 16 MB Size Limit
2727

28-
MongoDB limits BSON documents to 16 MB. If your document is larger than 16 MB,
28+
MongoDB limits individual BSON documents to 16 MB. If your document is larger than 16 MB,
2929
use the :ref:`GridFS <csharp-gridfs>` API instead.
3030

3131
An insert operation inserts one or more documents into a MongoDB collection.

source/fundamentals/gridfs.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ and reassemble those files when retrieving them. The driver's implementation of
2727
GridFS is an abstraction that manages the operations and organization of
2828
the file storage.
2929

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
3131
size limit of 16 MB. For more detailed information about whether GridFS is
3232
suitable for your use case, see :manual:`GridFS </core/gridfs>` in the
3333
{+mdb-server+} manual.
@@ -43,8 +43,8 @@ defined in the GridFS specification:
4343
- ``chunks``: Stores the binary file chunks
4444
- ``files``: Stores the file metadata
4545

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
4848
prefixed with the default bucket name ``fs``, unless you specify a different
4949
name. To ensure efficient retrieval of the files and related metadata, the driver
5050
creates an index on each collection. The driver ensures that these indexes exist
@@ -97,7 +97,7 @@ Customize the Bucket
9797
~~~~~~~~~~~~~~~~~~~~
9898

9999
You can customize the GridFS bucket configuration by passing an instance
100-
of the ``GridFSBucketOptions class`` class to
100+
of the ``GridFSBucketOptions`` class to
101101
the ``GridFSBucket()`` constructor. The following table describes the properties in the
102102
``GridFSBucketOptions`` class:
103103

@@ -154,7 +154,7 @@ You can upload files to a GridFS bucket by using the following methods:
154154
- ``UploadFromStreamAsync()`` or ``UploadFromStream()``: Uploads the contents of an existing
155155
stream to a GridFS file
156156

157-
The following sections describe these methods in more detail.
157+
The following sections describe how to use these methods.
158158

159159
.. _gridfs-open-upload-stream:
160160

@@ -182,10 +182,10 @@ stream for a given file name. These methods accept the following parameters:
182182
|
183183
| **Data type**: `CancellationToken <https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken>`__
184184

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
186186
following steps:
187187

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
189189
named ``"my_file"``
190190
- Calls the ``Write()`` method to write data to ``my_file``
191191
- 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:
223223
- Description
224224
* - ``BatchSize``
225225
- | 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.
227227
|
228228
| **Data type**: ``int?``
229229

@@ -304,7 +304,7 @@ contents of a stream to a new GridFS file. These methods accept the following pa
304304
|
305305
| **Data type**: `CancellationToken <https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken>`__
306306

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
308308
following steps:
309309

310310
- 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
550550
The following code example shows how to retrieve and print file metadata
551551
from files in a GridFS bucket. The ``Find()`` method returns an
552552
``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
554554
the returned cursor and display the contents of the files uploaded in the
555555
:ref:`gridfs-upload-files` examples.
556556

0 commit comments

Comments
 (0)