GridFSFileInfo.ContentType deprecation

83 views
Skip to first unread message

Matthew Nelson-White

unread,
Apr 14, 2016, 8:09:24 PM4/14/16
to mongodb-user
Hi,

In the mongo-csharp-driver project MongoDB.Driver.GridFS v2.2.3.3 I can see that the GridFSFileInfo.ContentType property is marked as deprecated with the note to "Place contentType inside metadata instead."

Why has this been marked as deprecated?
Will new versions of the GridFS engine put this data in metadata and not in contentType?
Is this a decision by the mongo-csharp-driver team made independent of the GridFS team?

Robert Stam

unread,
Apr 14, 2016, 11:13:55 PM4/14/16
to mongod...@googlegroups.com
All drivers, the C#/.NET driver included, are standardizing on a new GridFS API that is documented in this publicly available GridFS specification:


The specification provides the following rationale for deprecating the top level contentType field and encouraging applications to store contentType (along with any other application specific data) in the metadata field:

Why is contentType deprecated?
Most fields in the files collection document are directly used by the driver, with the exception of: metadata, contentType and aliases. All information that is purely for use of the application should be embedded in the 'metadata' document. Users of GridFS who would like to store a contentType for use in their applications are encouraged to add a 'contentType' field to the ‘metadata’ document instead of using the deprecated top-level ‘contentType’ field.

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/0edada82-8c4b-4cf2-92eb-4816cf6cbc2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages