filemd5

filemd5

The filemd5 command returns the md5 hash for a single file stored using the GridFS specification. filemd5命令返回使用GridFS规范存储的单个文件的md5哈希值。Client libraries use this command to verify that files are correctly written to MongoDB. 客户端库使用此命令验证文件是否正确写入MongoDB。The command takes the files_id of the file in question and the name of the GridFS root collection as arguments. 该命令将相关文件的files_id和GridFS根集合的名称作为参数。For example:例如:

{ filemd5: ObjectId("4f1f10e37671b50e4ecd2776"), root: "fs" }

MongoDB computes the filemd5 using all data in the GridFS file object pulled sequentially from each chunk in the chunks collection.MongoDB使用GridFS文件对象中的所有数据来计算filemd5,这些数据是从chunks集合中的每个块中按顺序提取的。

←  dropIndexesfsync →