File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
key/load_local_certificate Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,6 @@ const keyClient = new KeyClient();
88const dirPath = path . join ( __dirname , '/certificate.p12' ) ;
99const 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' ) ;
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments