X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Flocal-actor.ts;h=821a92b9123c13467846bd28b9a0dd31a8ee6245;hb=6770ae4c8582514e4d303d537b53e17821ba6c6d;hp=2d2bd43a162f77bf25413242c6b99794b6d3e522;hpb=ea54cd04c1ff0e55651cd5fb1a83672acde68604;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts index 2d2bd43a1..821a92b91 100644 --- a/server/lib/local-actor.ts +++ b/server/lib/local-actor.ts @@ -1,9 +1,9 @@ import 'multer' import { queue } from 'async' -import * as LRUCache from 'lru-cache' +import LRUCache from 'lru-cache' import { join } from 'path' -import { v4 as uuidv4 } from 'uuid' import { getLowercaseExtension } from '@server/helpers/core-utils' +import { buildUUID } from '@server/helpers/uuid' import { ActorModel } from '@server/models/actor/actor' import { ActivityPubActorType, ActorImageType } from '@shared/models' import { retryTransactionWrapper } from '../helpers/database-utils' @@ -44,7 +44,7 @@ async function updateLocalActorImageFile ( const extension = getLowercaseExtension(imagePhysicalFile.filename) - const imageName = uuidv4() + extension + const imageName = buildUUID() + extension const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, imageName) await processImage(imagePhysicalFile.path, destination, imageSize)