From e9428a5a0542479a4b45e3b905c677d4f1da6e9a Mon Sep 17 00:00:00 2001 From: smitten Date: Sun, 31 Dec 2023 09:03:46 -0500 Subject: [PATCH] Use hex digest --- .../src/queue/processors/ImportNotesProcessorService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts index 67078adaf6..769f4d1db7 100644 --- a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts +++ b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts @@ -471,8 +471,8 @@ export class ImportNotesProcessorService { for await (const file of post.object.attachment) { const slashdex = file.url.lastIndexOf('/'); const filename = file.url.substring(slashdex + 1); - const hash = crypto.createHash('md5').setEncoding('hex'); - const urlHash = hash.update(file.url).digest('base64'); + const hash = crypto.createHash('md5'); + const urlHash = hash.update(file.url).digest('hex'); const name = `${urlHash}-${filename}`; const [filePath, cleanup] = await createTemp();