fix other mime types not updating without a server restart

master
some random guy 4 months ago
parent 73c8219eb0
commit b12a94c1db
  1. 4
      lib/file/mimetypes.js
  2. 2
      models/forms/makepost.js

@ -62,6 +62,8 @@ module.exports = {
return config.get.allowMimeNoMatch;
},
image, animatedImage, video, audio, other
getOther: () => other,
image, animatedImage, video, audio
};

@ -246,7 +246,7 @@ module.exports = async (req, res) => {
await moveUpload(file, processedFile.filename, 'file');
}
};
if (mimeTypes.other.has(processedFile.mimetype)) {
if (mimeTypes.getOther().has(processedFile.mimetype)) {
//"other" mimes from config, overrides main type to avoid codec issues in browser or ffmpeg for unsupported filetypes
processedFile.hasThumb = false;
processedFile.attachment = true;

Loading…
Cancel
Save