- Reference >
- Database Commands >
- Administration Commands >
- filemd5
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 thefiles_id
of the file in question and the name of the GridFS root collection as arguments. For example:MongoDB computes the
filemd5
using all data in the GridFS file object pulled sequentially from each chunk in thechunks
collection.