Use hex digest
This commit is contained in:
parent
0bb0d69543
commit
e9428a5a05
1 changed files with 2 additions and 2 deletions
|
@ -471,8 +471,8 @@ export class ImportNotesProcessorService {
|
||||||
for await (const file of post.object.attachment) {
|
for await (const file of post.object.attachment) {
|
||||||
const slashdex = file.url.lastIndexOf('/');
|
const slashdex = file.url.lastIndexOf('/');
|
||||||
const filename = file.url.substring(slashdex + 1);
|
const filename = file.url.substring(slashdex + 1);
|
||||||
const hash = crypto.createHash('md5').setEncoding('hex');
|
const hash = crypto.createHash('md5');
|
||||||
const urlHash = hash.update(file.url).digest('base64');
|
const urlHash = hash.update(file.url).digest('hex');
|
||||||
const name = `${urlHash}-${filename}`;
|
const name = `${urlHash}-${filename}`;
|
||||||
const [filePath, cleanup] = await createTemp();
|
const [filePath, cleanup] = await createTemp();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue