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)); }