aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/avatar.ts2
-rw-r--r--server/lib/thumbnail.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/avatar.ts b/server/lib/avatar.ts
index dca543d0b..09b4e38ca 100644
--- a/server/lib/avatar.ts
+++ b/server/lib/avatar.ts
@@ -15,7 +15,7 @@ async function updateActorAvatarFile (avatarPhysicalFile: Express.Multer.File, a
15 const extension = extname(avatarPhysicalFile.filename) 15 const extension = extname(avatarPhysicalFile.filename)
16 const avatarName = uuidv4() + extension 16 const avatarName = uuidv4() + extension
17 const destination = join(CONFIG.STORAGE.AVATARS_DIR, avatarName) 17 const destination = join(CONFIG.STORAGE.AVATARS_DIR, avatarName)
18 await processImage(avatarPhysicalFile, destination, AVATARS_SIZE) 18 await processImage(avatarPhysicalFile.path, destination, AVATARS_SIZE)
19 19
20 return retryTransactionWrapper(() => { 20 return retryTransactionWrapper(() => {
21 return sequelizeTypescript.transaction(async t => { 21 return sequelizeTypescript.transaction(async t => {
diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts
index 8ad82ee80..4ba521b97 100644
--- a/server/lib/thumbnail.ts
+++ b/server/lib/thumbnail.ts
@@ -16,7 +16,7 @@ function createPlaylistMiniatureFromExisting (inputPath: string, playlist: Video
16 const { filename, outputPath, height, width, existingThumbnail } = buildMetadataFromPlaylist(playlist, size) 16 const { filename, outputPath, height, width, existingThumbnail } = buildMetadataFromPlaylist(playlist, size)
17 const type = ThumbnailType.MINIATURE 17 const type = ThumbnailType.MINIATURE
18 18
19 const thumbnailCreator = () => processImage({ path: inputPath }, outputPath, { width, height }, keepOriginal) 19 const thumbnailCreator = () => processImage(inputPath, outputPath, { width, height }, keepOriginal)
20 return createThumbnailFromFunction({ thumbnailCreator, filename, height, width, type, existingThumbnail }) 20 return createThumbnailFromFunction({ thumbnailCreator, filename, height, width, type, existingThumbnail })
21} 21}
22 22
@@ -37,7 +37,7 @@ function createVideoMiniatureFromUrl (url: string, video: VideoModel, type: Thum
37 37
38function createVideoMiniatureFromExisting (inputPath: string, video: VideoModel, type: ThumbnailType, size?: ImageSize) { 38function createVideoMiniatureFromExisting (inputPath: string, video: VideoModel, type: ThumbnailType, size?: ImageSize) {
39 const { filename, outputPath, height, width, existingThumbnail } = buildMetadataFromVideo(video, type, size) 39 const { filename, outputPath, height, width, existingThumbnail } = buildMetadataFromVideo(video, type, size)
40 const thumbnailCreator = () => processImage({ path: inputPath }, outputPath, { width, height }) 40 const thumbnailCreator = () => processImage(inputPath, outputPath, { width, height })
41 41
42 return createThumbnailFromFunction({ thumbnailCreator, filename, height, width, type, existingThumbnail }) 42 return createThumbnailFromFunction({ thumbnailCreator, filename, height, width, type, existingThumbnail })
43} 43}