diff options
Diffstat (limited to 'server/lib/thumbnail.ts')
-rw-r--r-- | server/lib/thumbnail.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts index 740b83acb..33aa7159c 100644 --- a/server/lib/thumbnail.ts +++ b/server/lib/thumbnail.ts | |||
@@ -166,6 +166,9 @@ async function createThumbnailFromFunction (parameters: { | |||
166 | }) { | 166 | }) { |
167 | const { thumbnailCreator, filename, width, height, type, existingThumbnail, automaticallyGenerated = null, fileUrl = null } = parameters | 167 | const { thumbnailCreator, filename, width, height, type, existingThumbnail, automaticallyGenerated = null, fileUrl = null } = parameters |
168 | 168 | ||
169 | // Remove old file | ||
170 | if (existingThumbnail) await existingThumbnail.removeThumbnail() | ||
171 | |||
169 | const thumbnail = existingThumbnail || new ThumbnailModel() | 172 | const thumbnail = existingThumbnail || new ThumbnailModel() |
170 | 173 | ||
171 | thumbnail.filename = filename | 174 | thumbnail.filename = filename |