diff --git a/controllers/file.controller.js b/controllers/file.controller.js index d5f8876..08b3b94 100644 --- a/controllers/file.controller.js +++ b/controllers/file.controller.js @@ -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; diff --git a/index.js b/index.js index ec0be88..b7d6ba4 100644 --- a/index.js +++ b/index.js @@ -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;