respect admin multiplier for uploads

This commit is contained in:
2026-01-27 12:01:38 +01:00
parent ff4a11b55c
commit e33115c2d9
2 changed files with 8 additions and 2 deletions

View File

@@ -138,7 +138,10 @@ export default router => {
}
// Validate file size
const maxfilesize = cfg.main.maxfilesize;
let maxfilesize = cfg.main.maxfilesize;
if (req.session.admin) {
maxfilesize = Math.floor(maxfilesize * cfg.main.adminmultiplier);
}
const size = file.data.length;
if (size > maxfilesize) {

View File

@@ -138,7 +138,10 @@ export const handleUpload = async (req, res) => {
}
// Validate file size
const maxfilesize = cfg.main.maxfilesize;
let maxfilesize = cfg.main.maxfilesize;
if (req.session.admin) {
maxfilesize = Math.floor(maxfilesize * cfg.main.adminmultiplier);
}
const size = file.data.length;
if (size > maxfilesize) {