mirror of
https://github.com/filecoffee/filehost.git
synced 2024-11-13 19:49:56 +01:00
dirty fix
This commit is contained in:
parent
c99ab6c3ec
commit
f13ba3475b
2 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
6
index.js
6
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue