Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return await this.attachment.client.statusAction(async status => {
const infoReq = new Uint8Array([blobInfo.totalLength]);
const infoRet = new Uint8Array(20);
await this.blobHandle!.getInfoAsync(status, infoReq.byteLength, infoReq, infoRet.byteLength, infoRet);
if (infoRet[0] != blobInfo.totalLength)
throw new Error('Unrecognized response from Blob::getInfo.');
const size = getPortableInteger(infoRet.subarray(1), 2);
return getPortableInteger(infoRet.subarray(3), size);
});
}
return await this.attachment.client.statusAction(async status => {
const infoReq = new Uint8Array([blobInfo.totalLength]);
const infoRet = new Uint8Array(20);
await this.blobHandle!.getInfoAsync(status, infoReq.byteLength, infoReq, infoRet.byteLength, infoRet);
if (infoRet[0] != blobInfo.totalLength)
throw new Error('Unrecognized response from Blob::getInfo.');
const size = getPortableInteger(infoRet.subarray(1), 2);
return getPortableInteger(infoRet.subarray(3), size);
});
}