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