Skip to content

Commit dadf2e5

Browse files
committed
Correct bloock snippets code
1 parent ed3f802 commit dadf2e5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/key/load_local_certificate/load_local_certificate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ const keyClient = new KeyClient();
88
const dirPath = path.join(__dirname, '/certificate.p12');
99
const buffer = fs.readFileSync(dirPath);
1010

11-
const _certificate = await keyClient.loadLocalCertificate(buffer, 'password');
11+
const uint8 = new Uint8Array(buffer);
12+
13+
const _certificate = await keyClient.loadLocalCertificate(uint8, 'password');

examples/record/prepare_record/prepare_record.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ try {
1414

1515
// we can read a file as an array of bytes
1616
const file = fs.readFileSync('sample.pdf');
17-
const _record3 = await recordClient.fromFile(file).build();
17+
const uint8 = new Uint8Array(file);
18+
19+
const _record3 = await recordClient.fromFile(uint8).build();
1820
} catch (e) {
1921
console.log(e);
2022
}

0 commit comments

Comments
 (0)