fix a mimetype check from last update

merge-requests/208/head
fatchan 5 years ago
parent 1dac2c8ea6
commit 2a42b1d78f
  1. 2
      models/forms/makepost.js

@ -205,7 +205,7 @@ module.exports = async (req, res, next) => {
const existsThumb = await pathExists(`${uploadDirectory}/img/thumb-${processedFile.hash}${processedFile.thumbextension}`);
processedFile.geometry = imageData.size ;
processedFile.geometryString = imageData.Geometry;
processedFile.hasThumb = !(fileCheckMimeType(file.mimetype, {image: true})
processedFile.hasThumb = !(mimeTypes.allowed(file.mimetype, {image: true})
&& processedFile.geometry.height <= thumbSize
&& processedFile.geometry.width <= thumbSize);
if (!existsFull) {

Loading…
Cancel
Save