[CSHARP-15] Implement the facility to update "files" metadata object in MongoDB.GridFs.GridFileInfo Created: 18/Feb/10  Updated: 02/Mar/10  Resolved: 25/Feb/10

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Critical - P2
Reporter: Syed Saleem Javid Brahmanapalli Assignee: Sam Corder
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The current implementation of GridFileInfo does not provide API's to manipulate the metadata associated with a file within GridFS.
This functionality is critical when using GridFS.

The current mongo db GridFS spec (http://www.mongodb.org/display/DOCS/GridFS+Specification) defines the "files" metadata object as

{
"_id" : <unspecified>, // unique ID for this file
"filename" : data_string, // human name for the file
"contentType" : data_string, // valid mime type for the object
"length" : data_number, // size of the file in bytes
"chunkSize" : data_number, // size of each of the chunks. Default is 256k
"uploadDate" : data_date, // date when object first stored
"aliases" : data_array of data_string, // optional array of alias strings
"metadata" : data_object, // anything the user wants to store
"md5" : data_string // result of running the "filemd5" command on this file's chunks
}

Please expose the data_object associated with the "metadata" key through GridFileInfo class so that we can define/manipulate its contents.



 Comments   
Comment by Sam Corder [ 25/Feb/10 ]

Added GridFileInfo.UpdateInfo() that updates the upload date, aliases, meta data and content type from the corresponding properties on GridFileInfo. Currently in master and will be in .81.

Generated at Wed Feb 07 21:35:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.