I want to create checksum(MD5) for the large files(around 1 GB) uploaded in the blob. I an using blob trigger azure function. Any approach. currently, my code is this
const {
exec
} = require('child_process');
function execShellCommand(cmd) {
return new Promise((resolve, reject) => {
exec(cmd, (error, stdout, stderr) => {
if (error) {
console.log(error);
}
resolve(stdout? stdout : stderr);
});
});
}
module.exports = async function (context, myBlob) {
context.log(myBlob.toString());
context.log(context.bindingData.blobTrigger);
const data = myBlob.toString();
const output = await execShellCommand(`echo -n ${data} | md5sum`);
context.log(output);
context.bindings.outputBlob = output;
};
but this will not handle big files