thumbnail uses file random ID now to avoid conflicts

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

@ -82,5 +82,5 @@ function getImageThumbnail(file) {
module.exports = (file) =>
new Promise((resolve, reject) =>
(file.is.video ? getVideoThumbnail : file.is.image ? getImageThumbnail : () => Promise.resolve())(file)
.then(() => resolve((file.is.video || file.is.image) ? getNewName(file.originalname) : file.is.audio ? 'views/ass-audio-icon.png' : 'views/ass-file-icon.png'))
.then(() => resolve((file.is.video || file.is.image) ? getNewName(file.randomId) : file.is.audio ? 'views/ass-audio-icon.png' : 'views/ass-file-icon.png'))
.catch(reject));

Loading…
Cancel
Save