fixed thumbnails not saving properly

pull/29/head
tycrek 3 years ago
parent ff1884d8d9
commit 86a5de602e
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

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

Loading…
Cancel
Save