diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-23 10:30:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | 240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e (patch) | |
tree | 99879ddce7d4b2970c263cb045c5057ed07354d4 /server/lib/avatar.ts | |
parent | 83e6519ba4ee752dc3148a16c69effbfccb13e6b (diff) | |
download | PeerTube-240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e.tar.gz PeerTube-240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e.tar.zst PeerTube-240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e.zip |
Fix tests
Diffstat (limited to 'server/lib/avatar.ts')
-rw-r--r-- | server/lib/avatar.ts | 3 |
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 @@ | |||
1 | import 'multer' | 1 | import 'multer' |
2 | import * as uuidv4 from 'uuid' | ||
3 | import { sendUpdateActor } from './activitypub/send' | 2 | import { sendUpdateActor } from './activitypub/send' |
4 | import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers' | 3 | import { AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../initializers' |
5 | import { updateActorAvatarInstance } from './activitypub' | 4 | import { 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 | ||