diff --git a/src/hooks/custom/SplitPdfHook.ts b/src/hooks/custom/SplitPdfHook.ts index aec9b8f..7446b9c 100644 --- a/src/hooks/custom/SplitPdfHook.ts +++ b/src/hooks/custom/SplitPdfHook.ts @@ -1,5 +1,4 @@ import async from "async"; -import {randomUUID} from 'crypto'; import { AfterErrorContext, @@ -26,6 +25,7 @@ import { } from "./utils/index.js"; import { HTTPClientExtension, + generateGuid, MIN_PAGES_PER_THREAD, PARTITION_FORM_FILES_KEY, PARTITION_FORM_SPLIT_PDF_PAGE_KEY, @@ -99,7 +99,7 @@ export class SplitPdfHook ): Promise { // setting the current operationID to be unique - const operationID = "partition-" + randomUUID(); + const operationID = "partition-" + generateGuid(); hookCtx.operationID = operationID; const requestClone = request.clone(); diff --git a/src/hooks/custom/common.ts b/src/hooks/custom/common.ts index 72c8681..f2b3db0 100644 --- a/src/hooks/custom/common.ts +++ b/src/hooks/custom/common.ts @@ -46,3 +46,7 @@ export class HTTPClientExtension extends HTTPClient { return super.request(request); } } + +export function generateGuid() { + return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); +} \ No newline at end of file