diff --git a/helpers/imagehash.js b/helpers/imagehash.js index e01e7265..458d7350 100644 --- a/helpers/imagehash.js +++ b/helpers/imagehash.js @@ -11,7 +11,6 @@ module.exports = async (req, res, next) => { const mainType = req.files.file[i].mimetype.split('/')[0]; if (mainType === 'image' || mainType === 'video') { hashPromises.push(imageHash(req.files.file[i].tempFilePath, 8, 'hex').then(res => { - console.log(res.hash); req.files.file[i].phash = res.hash; })); } diff --git a/models/forms/makepost.js b/models/forms/makepost.js index 25cc6081..8710b596 100644 --- a/models/forms/makepost.js +++ b/models/forms/makepost.js @@ -248,6 +248,11 @@ ${res.locals.numFiles > 0 ? req.files.file.map(f => f.name+'|'+(f.phash || '')). extension, }; + //phash + if (file.phash) { + processedFile.phash = file.phash; + } + //type and subtype let [type, subtype] = processedFile.mimetype.split('/'); //check if already exists diff --git a/views/pages/globalmanagesettings.pug b/views/pages/globalmanagesettings.pug index 54af13e2..1f248f6b 100644 --- a/views/pages/globalmanagesettings.pug +++ b/views/pages/globalmanagesettings.pug @@ -76,7 +76,7 @@ block content .label Thumbnail File Extension input(type='text' name='thumb_extension' value=settings.thumbExtension) .row - .label Hash Images + .label Fuzzy Hash Images label.postform-style.ph-5 input(type='checkbox', name='hash_images' value='true' checked=settings.hashImages) .row