aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-23 10:30:53 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commit240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e (patch)
tree99879ddce7d4b2970c263cb045c5057ed07354d4 /server/lib
parent83e6519ba4ee752dc3148a16c69effbfccb13e6b (diff)
downloadPeerTube-240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e.tar.gz
PeerTube-240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e.tar.zst
PeerTube-240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e.zip
Fix tests
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/avatar.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/lib/avatar.ts b/server/lib/avatar.ts
index 7fdef008c..5cfb81fc7 100644
--- a/server/lib/avatar.ts
+++ b/server/lib/avatar.ts
@@ -1,5 +1,4 @@
1import 'multer' 1import 'multer'
2import * as uuidv4 from 'uuid'
3import { sendUpdateActor } from './activitypub/send' 2import { sendUpdateActor } from './activitypub/send'
4import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers' 3import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers'
5import { updateActorAvatarInstance } from './activitypub' 4import { updateActorAvatarInstance } from './activitypub'
@@ -15,7 +14,7 @@ async function updateActorAvatarFile (
15 accountOrChannel: AccountModel | VideoChannelModel 14 accountOrChannel: AccountModel | VideoChannelModel
16) { 15) {
17 const extension = extname(avatarPhysicalFile.filename) 16 const extension = extname(avatarPhysicalFile.filename)
18 const avatarName = uuidv4() + extension 17 const avatarName = actor.uuid + extension
19 const destination = join(CONFIG.STORAGE.AVATARS_DIR, avatarName) 18 const destination = join(CONFIG.STORAGE.AVATARS_DIR, avatarName)
20 await processImage(avatarPhysicalFile, destination, AVATARS_SIZE) 19 await processImage(avatarPhysicalFile, destination, AVATARS_SIZE)
21 20