Details
-
New Feature
-
Resolution: Done
-
Critical - P2
-
None
-
None
-
None
-
None
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.