Closed lucasarama closed 3 years ago
I found the answer, sorry. The hash is based on the file Buffer for create hash like when you upload do that :
createHash(path: string) {
const data = fs.readFileSync(path); // send a buffer if file exist on path
return crypto.createHash('md5').update(data).digest('hex'); // return hash on hex format like uploaded files
}
Hi, I want to create an hash for an other file based on the same algorithm of you. So, how do you produce the md5 (on what is based, name, size... ?)