Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ Parameters

.. versionadded:: 1.17

* - disableMD5
- boolean
- Whether to disable automatic MD5 generation when storing files.

Defaults to ``false``. Only ``true`` will be supported in 2.0.

.. versionadded:: 1.4

* - readConcern
- :php:`MongoDB\Driver\ReadConcern <class.mongodb-driver-readconcern>`
- The default read concern to use for bucket operations. Defaults to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ Parameters
- The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes``
option.

* - disableMD5
- boolean
- Whether to disable automatic MD5 generation when storing files.

Defaults to ``false``. Only ``true`` will be supported in 2.0.

.. versionadded:: 1.4

* - metadata
- array|object
- User data for the ``metadata`` field of the file document. If not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ Parameters
- The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes``
option.

* - disableMD5
- boolean
- Whether to disable automatic MD5 generation when storing files.

Defaults to ``false``. Only ``true`` will be supported in 2.0.

.. versionadded:: 1.4

* - metadata
- array|object
- User data for the ``metadata`` field of the file document. If not
Expand Down
8 changes: 0 additions & 8 deletions source/reference/method/MongoDBGridFSBucket__construct.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ Parameters

.. versionadded:: 1.17

* - disableMD5
- boolean
- Whether to disable automatic MD5 generation when storing files.

Defaults to ``false``. Only ``true`` will be supported in 2.0.

.. versionadded:: 1.4

* - readConcern
- :php:`MongoDB\Driver\ReadConcern <class.mongodb-driver-readconcern>`
- The default read concern to use for bucket operations. Defaults to the
Expand Down
22 changes: 22 additions & 0 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ What's New
Learn about new features, improvements, and fixes introduced in the
following versions of the {+php-library+}:

* :ref:`Version 2.0 <php-lib-version-2.0>`

* :ref:`Version 1.20 <php-lib-version-1.20>`

* :ref:`Version 1.19 <php-lib-version-1.19>`
Expand All @@ -32,6 +34,26 @@ following versions of the {+php-library+}:

* :ref:`Version 1.15 <php-lib-version-1.15>`

.. _php-lib-version-2.0:

What's New in 2.0
-----------------

The {+library-short+} v2.0 release includes the following features,
improvements, and fixes:

- Removal of deprecated fields in GridFS types.

- The library does not calculate the ``md5`` field when a file is
uploaded to GridFS. If your application requires a file digest, you
must implement this process outside GridFS and store the values in
metadata.

- The fields ``contentType`` and ``aliases`` are no longer stored in
the ``files`` GridFS collection. If your application requires this
information, you must store it in metadata. To learn mor about
GridFS, see the :ref:`php-gridfs` guide.

.. _php-lib-version-1.20:

What's New in 1.20
Expand Down
6 changes: 3 additions & 3 deletions source/write/gridfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ the returned cursor and display the contents of the files uploaded in the
:visible: false

{ "_id" : { "$oid" : "..." }, "chunkSize" : 261120, "filename" : "my_file",
"length" : 13, "uploadDate" : { ... }, "metadata" : { "contentType" : "text/plain" },
"md5" : "6b24249b03ea3dd176c5a04f037a658c" }
"length" : 13, "uploadDate" : { ... }, "metadata" : {
"contentType" : "text/plain" } }
{ "_id" : { "$oid" : "..." }, "chunkSize" : 261120, "filename" : "new_file",
"length" : 13, "uploadDate" : { ... }, "md5" : "6b24249b03ea3dd176c5a04f037a658c" }
"length" : 13, "uploadDate" : { ... } }

The ``find()`` method accepts various query specifications. You can use its
``$options`` parameter to specify the sort order, maximum number of documents to return,
Expand Down