From 26c99d13578cc1b1be2d9684ea42cc6c6e381914 Mon Sep 17 00:00:00 2001 From: TitiAlone Date: Sat, 1 Aug 2020 12:49:06 +0200 Subject: [PATCH] Fix for LaTeX document maximum size limit --- packages/zmarkdown/server/routes/endpoints.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/zmarkdown/server/routes/endpoints.js b/packages/zmarkdown/server/routes/endpoints.js index 991efb10e..8bd5587cc 100644 --- a/packages/zmarkdown/server/routes/endpoints.js +++ b/packages/zmarkdown/server/routes/endpoints.js @@ -4,28 +4,29 @@ const express = require('express') const controllerFactory = require('../factories/controller-factory') const router = express.Router() +const limit = '300kb' router.post( '/html', - bodyParser.json({limit: '300kb'}), + bodyParser.json({limit}), controllerFactory('html'), ) router.post( '/latex', - bodyParser.json({limit: '300kb'}), + bodyParser.json({limit}), controllerFactory('latex'), ) router.post( '/epub', - bodyParser.json({limit: '300kb'}), + bodyParser.json({limit}), controllerFactory('epub'), ) router.post( '/latex-document', - bodyParser.json({limit: '300kb'}), + bodyParser.json({limit: '3mb'}), controllerFactory('latex', require('../templates/latex-document')), )