对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

filemd5(数据库命令)

重要

已弃用的命令

此命令已弃用,不鼓励使用,因为 MD5 不再被视为加密安全的。

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: The fully managed service for MongoDB deployments in the cloud

注意

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

该命令具有以下语法:

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

MongoDBfilemd5 chunks使用从collection中的每个数据块按顺序提取的 GridFS 文件对象中的所有数据来计算 。

给本页内容打分

在此页面上