dirty fix

This commit is contained in:
Daniël 2024-06-09 15:41:06 +02:00
parent c99ab6c3ec
commit f13ba3475b
2 changed files with 6 additions and 3 deletions

View file

@ -11,9 +11,6 @@ const fileNameLength = parseInt(process.env.FILE_NAME_LENGTH, 10) || 10;
const multerOptions = {
limits: parseInt(process.env.FILE_MAX_SIZE_MB, 10) * 1024 * 1024,
};
const publicMulterOptions = {
limits: parseInt(process.env.PUBLIC_UPLOAD_SIZE_LIMIT, 10) * 1024 * 1024,
};
let storageEngine;

View file

@ -15,6 +15,12 @@ const s3 = require("./engines/s3.engine");
const local = require("./engines/local.engine");
const storageMode = process.env.STORAGE_MODE || "local";
// Todo: refactor this way.
const fileNameLength = parseInt(process.env.FILE_NAME_LENGTH, 10) || 10;
const multerOptions = {
limits: parseInt(process.env.FILE_MAX_SIZE_MB, 10) * 1024 * 1024,
};
app.get("/", async (req, res) => {
let storageEngine;