filemd5

  • filemd5
  • The filemd5 command returns the md5 hash for a singlefile stored using the GridFS specification. Client librariesuse this command to verify that files are correctly written to MongoDB.The command takes the files_id of the file in question and thename of the GridFS root collection as arguments. For example:
  1. { filemd5: ObjectId("4f1f10e37671b50e4ecd2776"), root: "fs" }

MongoDB computes the filemd5 using all data in the GridFS file objectpulled sequentially from each chunk in the chunks collection.