Importante
Comando obsoleto
Este comando é preterido e seu uso é desaconselhável, pois o MD5 não é mais considerado criptograficamente seguro.
Definição
filemd5The
filemd5command 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 thefiles_idof the file in question and the name of the GridFS root collection as arguments.
Compatibilidade
Esse comando está disponÃvel em implantações hospedadas nos seguintes ambientes:
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
Observação
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: a versão autogerenciada e baseada em assinatura do MongoDB
MongoDB Community: uma versão com código disponÃvel, de uso gratuito e autogerenciada do MongoDB
Sintaxe
O comando tem a seguinte sintaxe:
db.runCommand( { filemd5: ObjectId("4f1f10e37671b50e4ecd2776"), root: "fs" } )
O MongoDB calcula o filemd5 usando todos os dados no objeto GridFS extraÃdo sequencialmente de cada chunk na coleção chunks .