imghash doesnt support video it seems

jschan
Thomas Lynch 3 years ago
parent f0cc975ad9
commit 5768591742
Signed by: fatchan
GPG Key ID: 112884AA57DF40B1
  1. 2
      helpers/imagehash.js

@ -9,7 +9,7 @@ module.exports = async (req, res, next) => {
const hashPromises = [];
for (let i = 0; i < res.locals.numFiles; i++) {
const mainType = req.files.file[i].mimetype.split('/')[0];
if (mainType === 'image' || mainType === 'video') {
if (mainType === 'image') {
hashPromises.push(imageHash(req.files.file[i].tempFilePath, 8, 'hex').then(res => {
req.files.file[i].phash = res;
}));

Loading…
Cancel
Save