File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
import async from "async" ;
2
- import { randomUUID } from 'crypto' ;
3
2
4
3
import {
5
4
AfterErrorContext ,
@@ -26,6 +25,7 @@ import {
26
25
} from "./utils/index.js" ;
27
26
import {
28
27
HTTPClientExtension ,
28
+ generateGuid ,
29
29
MIN_PAGES_PER_THREAD ,
30
30
PARTITION_FORM_FILES_KEY ,
31
31
PARTITION_FORM_SPLIT_PDF_PAGE_KEY ,
@@ -99,7 +99,7 @@ export class SplitPdfHook
99
99
) : Promise < Request > {
100
100
101
101
// setting the current operationID to be unique
102
- const operationID = "partition-" + randomUUID ( ) ;
102
+ const operationID = "partition-" + generateGuid ( ) ;
103
103
hookCtx . operationID = operationID ;
104
104
105
105
const requestClone = request . clone ( ) ;
Original file line number Diff line number Diff line change @@ -46,3 +46,7 @@ export class HTTPClientExtension extends HTTPClient {
46
46
return super . request ( request ) ;
47
47
}
48
48
}
49
+
50
+ export function generateGuid ( ) {
51
+ return Math . random ( ) . toString ( 36 ) . substring ( 2 , 15 ) + Math . random ( ) . toString ( 36 ) . substring ( 2 , 15 ) ;
52
+ }
You can’t perform that action at this time.
0 commit comments