From 0c7b193c5abbb18c17eabb47606225aa287cc111 Mon Sep 17 00:00:00 2001 From: Christoph Schaefer Date: Wed, 24 Jun 2026 09:45:28 +0200 Subject: [PATCH 1/3] feat: bump server to raise maxDownloadBytes and input limits to 500MB Server submodule (e4153f8) raises FileConverter.converter.maxDownloadBytes from 100MB to 500MB and every inputLimits uncompressed zip size to 500MB in Common/config/default.json. These are the new built-in defaults that the docker-entrypoint env overrides build on (#210). Signed-off-by: Christoph Schaefer Assisted-by: ClaudeCode:claude-sonnet-4-6 --- server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server b/server index 7f1cfe4fab..e4153f8701 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 7f1cfe4fab1fef31bcc7479db6b5f646eece9a6a +Subproject commit e4153f8701da238efad364bb8794ff7b4b103a56 From ad0d7c6535f624bef7c0c84ba04a3bb56881329a Mon Sep 17 00:00:00 2001 From: Christoph Schaefer Date: Wed, 24 Jun 2026 09:45:34 +0200 Subject: [PATCH 2/3] feat: make FileConverter download size and input limits configurable (#210) Add two runtime overrides to the generated NODE_CONFIG in docker-entrypoint.sh so the max upload/conversion size can be tuned without mounting local.json (which is regenerated on every start): - FILECONVERTER_MAX_DOWNLOAD_BYTES (default 500MB) - FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED (default 500MB) The interpolated values must break out of the single-quoted NODE_CONFIG string ('${VAR:-default}') to be expanded by the shell; otherwise the literal ${VAR} is written into the JSON and breaks config parsing at startup. Signed-off-by: Christoph Schaefer Assisted-by: ClaudeCode:claude-sonnet-4-6 --- build/scripts/orchestrated/docker-entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/scripts/orchestrated/docker-entrypoint.sh b/build/scripts/orchestrated/docker-entrypoint.sh index 2be78aad84..b7c54a113e 100755 --- a/build/scripts/orchestrated/docker-entrypoint.sh +++ b/build/scripts/orchestrated/docker-entrypoint.sh @@ -184,6 +184,13 @@ export NODE_CONFIG='{ "FileConverter": { "converter": { "maxprocesscount": 0.001, + "maxDownloadBytes": '${FILECONVERTER_MAX_DOWNLOAD_BYTES:-524288000}', + "inputLimits": [ + { "type": "docx;dotx;docm;dotm", "zip": { "uncompressed": "'${FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED:-500MB}'", "template": "*.xml" } }, + { "type": "xlsx;xltx;xlsm;xltm", "zip": { "uncompressed": "'${FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED:-500MB}'", "template": "*.xml" } }, + { "type": "pptx;ppsx;potx;pptm;ppsm;potm", "zip": { "uncompressed": "'${FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED:-500MB}'", "template": "*.xml" } }, + { "type": "vsdx;vstx;vssx;vsdm;vstm;vssm", "zip": { "uncompressed": "'${FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED:-500MB}'", "template": "*.xml" } } + ], "signingKeyStorePath": "/var/www/'${COMPANY_NAME}'/config/signing-keystore.p12" } }, From 1a0e285dfd2f2eef885083eefa178581eba7917d Mon Sep 17 00:00:00 2001 From: Christoph Schaefer Date: Wed, 24 Jun 2026 12:18:24 +0200 Subject: [PATCH 3/3] feat: add FILECONVERTER size env vars to standalone entrypoint The standalone image runs build/scripts/standalone/entrypoint.sh (not the orchestrated entrypoint). The FileConverter env var support added in the orchestrated script was absent here. Add FILECONVERTER_MAX_DOWNLOAD_BYTES and FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED with the same jq_set pattern used by every other configurable setting in this script. When set, FILECONVERTER_MAX_DOWNLOAD_BYTES replaces maxDownloadBytes (must be a plain byte count; non-numeric values are warned and skipped). When set, FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED replaces the uncompressed limit for all four zip-based formats (docx, xlsx, pptx, vsdx). When unset, the built-in default.json values apply (500 MB each). Assisted-by: ClaudeCode:claude-sonnet-4-6 --- build/scripts/standalone/entrypoint.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build/scripts/standalone/entrypoint.sh b/build/scripts/standalone/entrypoint.sh index 7fea010373..a15a3c9fdd 100644 --- a/build/scripts/standalone/entrypoint.sh +++ b/build/scripts/standalone/entrypoint.sh @@ -242,6 +242,26 @@ if [ "$METRICS_ENABLED" = "true" ]; then jq_set '.statsd.prefix = $metricsPrefix' fi +# FileConverter limits (max upload/conversion size). +# Both are optional overrides; when unset the built-in default.json values apply. +# maxDownloadBytes: max size in bytes of the file the converter will download. +if [ -n "${FILECONVERTER_MAX_DOWNLOAD_BYTES:-}" ]; then + case "$FILECONVERTER_MAX_DOWNLOAD_BYTES" in + ''|*[!0-9]*) >&2 echo "WARN: FILECONVERTER_MAX_DOWNLOAD_BYTES is not a plain byte count, ignoring" ;; + *) jq_set '.FileConverter.converter.maxDownloadBytes = ($maxDownloadBytes | tonumber)' ;; + esac +fi +# inputLimits: max *uncompressed* size of the office file's zip (e.g. "500MB"). +# Replaces the whole inputLimits array (node-config replaces arrays, not merges). +if [ -n "${FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED:-}" ]; then + jq_set '.FileConverter.converter.inputLimits = [ + { "type": "docx;dotx;docm;dotm", "zip": { "uncompressed": $inputLimitUncompressed, "template": "*.xml" } }, + { "type": "xlsx;xltx;xlsm;xltm", "zip": { "uncompressed": $inputLimitUncompressed, "template": "*.xml" } }, + { "type": "pptx;ppsx;potx;pptm;ppsm;potm", "zip": { "uncompressed": $inputLimitUncompressed, "template": "*.xml" } }, + { "type": "vsdx;vstx;vssx;vsdm;vstm;vssm", "zip": { "uncompressed": $inputLimitUncompressed, "template": "*.xml" } } + ]' +fi + # Construct the AMQP URI value (may be unused if AMQP_HOST=localhost and AMQP_URI unset). # AMQP_VHOST is a vhost name (e.g. "myvhost"); normalize to a leading slash before # appending to the URI so values without it still produce a valid amqp:// URI. @@ -282,6 +302,8 @@ jq \ --arg metricsHost "$METRICS_HOST" \ --arg metricsPort "$METRICS_PORT" \ --arg metricsPrefix "$METRICS_PREFIX" \ + --arg maxDownloadBytes "${FILECONVERTER_MAX_DOWNLOAD_BYTES:-}" \ + --arg inputLimitUncompressed "${FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED:-}" \ "$jq_filter" \ "$CONFIG_FILE" > "${CONFIG_FILE}.tmp" mv "${CONFIG_FILE}.tmp" "$CONFIG_FILE"