Updated uploadController.js

Make sure .generateThumbs() is always on force mode.
There may be stray thumbnails that weren't stored in DB due to
unexpected errors and whatnot.
This commit is contained in:
Bobby Wibowo 2020-06-15 21:10:40 +07:00
parent 0b8b1ed026
commit 14b97ecbf1
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -692,7 +692,7 @@ self.storeFilesToDb = async (req, res, user, infoMap) => {
// Generate thumbs, but do not wait
if (utils.mayGenerateThumb(info.data.extname))
utils.generateThumbs(info.data.filename, info.data.extname).catch(logger.error)
utils.generateThumbs(info.data.filename, info.data.extname, true).catch(logger.error)
}))
if (files.length) {