Docs 菜单

filemd5

在此页面上

filemd5

The filemd5 command returns the MD5 hash for a single file stored using the GridFS specification. Client libraries use this command to verify that files are correctly written to MongoDB. The command takes the files_id of the file in question and the name of the GridFS root collection as arguments.

此命令可用于以下环境中托管的部署:

注意

所有 MongoDB Atlas 集群都支持此命令。有关 Atlas 对所有命令的支持的信息,请参阅不支持的命令

该命令具有以下语法:

db.runCommand(
{
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.

在此页面上