added file size cap and favicon

This commit is contained in:
2024-06-03 10:20:31 -04:00
parent 10e17beefc
commit fb3153c7a5
3 changed files with 7 additions and 1 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

+7 -1
View File
@@ -13,7 +13,13 @@ const app = express();
app.use(cors()); app.use(cors());
app.use(bodyParser.json()); app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.urlencoded({ extended: true }));
const upload = multer({ storage: multer.memoryStorage() }); app.use('/favicon.ico', express.static('favicon.ico'));
const upload = multer({
storage: multer.memoryStorage(), limits: {
fileSize: 2147483648 // 2GB
}
});
app.get('/', (_, res) => res.sendFile('index.html', { root: '.' })); app.get('/', (_, res) => res.sendFile('index.html', { root: '.' }));