From 86a5de602e7829acd95e30ee9e73137508788863 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sun, 11 Jul 2021 11:15:34 -0600 Subject: [PATCH] fixed thumbnails not saving properly --- thumbnails.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thumbnails.js b/thumbnails.js index 99dde14..b2f5d35 100644 --- a/thumbnails.js +++ b/thumbnails.js @@ -54,7 +54,7 @@ function getNewNamePath(oldName) { */ function getVideoThumbnail(file) { return new Promise((resolve, reject) => exec( - getCommand(file.path, getNewNamePath(file.originalname)), + getCommand(file.path, getNewNamePath(file.randomId)), (err) => (err ? reject(err) : resolve()) )); } @@ -69,7 +69,7 @@ function getImageThumbnail(file) { .then((image) => image .quality(THUMBNAIL.QUALITY) .resize(THUMBNAIL.WIDTH, THUMBNAIL.HEIGHT, Jimp.RESIZE_BICUBIC) - .write(getNewNamePath(file.originalname))) + .write(getNewNamePath(file.randomId))) .then(resolve) .catch(reject)); }