Skip to content

feat: raise maxDownloadBytes and inputLimits to 500MB, add runtime env vars (#210) - #237

Merged
chrip merged 3 commits into
mainfrom
feat/210-max-filesize
Aug 5, 2026
Merged

feat: raise maxDownloadBytes and inputLimits to 500MB, add runtime env vars (#210)#237
chrip merged 3 commits into
mainfrom
feat/210-max-filesize

Conversation

@chrip

@chrip chrip commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Context

Fixes #210. Companion server-side PR: Euro-Office/server#35both PRs must be merged together.

What changes

server submodule (Euro-Office/server#35)

Bumps the built-in defaults in Common/config/default.json:

  • maxDownloadBytes: 100 MB → 500 MB
  • All inputLimits uncompressed zip sizes: 50 MB / 300 MB → 500 MB

build/scripts/orchestrated/docker-entrypoint.sh

Fixes a single-quote escaping bug that caused env vars inside NODE_CONFIG='...' to be emitted literally (invalid JSON, silently ignored). Adds two runtime overrides:

  • FILECONVERTER_MAX_DOWNLOAD_BYTES — max file download size in bytes (default 500 MB)
  • FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED — max uncompressed zip size for docx/xlsx/pptx/vsdx (default 500 MB)

build/scripts/standalone/entrypoint.sh

Adds the same two env vars for the standalone (single-container) image, using the existing jq_set pattern. Without this the env vars were silently ignored in standalone deployments.

Testing

Verified with a 144 MB synthetic .docx file (incompressible random-noise PNGs):

  • File exceeds old 100 MB / 50 MB limits → would have been rejected before this fix
  • Opens successfully with the new 500 MB defaults
  • Env var override confirmed: setting FILECONVERTER_MAX_DOWNLOAD_BYTES=10485760 (10 MB) causes the file to be rejected; removing it restores the 500 MB default

Assisted-by: ClaudeCode:claude-sonnet-4-6

@chrip
chrip marked this pull request as ready for review June 24, 2026 11:20
@chrip
chrip requested a review from a team as a code owner June 24, 2026 11:20
@chrip
chrip requested review from rikled and removed request for a team June 24, 2026 11:20
@chrip
chrip requested a review from DmySyz July 27, 2026 19:23
chrip pushed a commit that referenced this pull request Jul 30, 2026
…ntrypoint

Adds MAX_FILE_SIZE (limits_tempfile_upload, plus the example app's
maxFileSize) and NGINX_CLIENT_MAX_BODY_SIZE (nginx client_max_body_size)
so those limits can be raised without hand-editing config after boot.

Scoped to avoid #237: FileConverter.converter.maxDownloadBytes and
.inputLimits[].zip.uncompressed are left untouched here since #237
already introduces FILECONVERTER_MAX_DOWNLOAD_BYTES and
FILECONVERTER_INPUT_LIMIT_UNCOMPRESSED for exactly those settings.

Signed-off-by: ckbkr <56784875+ckbaker10@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-sonnet-5
@chrip
chrip force-pushed the feat/210-max-filesize branch 2 times, most recently from 7f2c8d9 to e697e1a Compare August 4, 2026 19:40
chrip added 3 commits August 4, 2026 21:50
…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 <christoph.schaefer@nextcloud.com>
Assisted-by: ClaudeCode:claude-sonnet-4-6
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

Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
@chrip
chrip force-pushed the feat/210-max-filesize branch from e697e1a to 141172d Compare August 4, 2026 19:58
@chrip
chrip merged commit 2e5b661 into main Aug 5, 2026
8 checks passed
@chrip
chrip deleted the feat/210-max-filesize branch August 5, 2026 07:53
@github-project-automation github-project-automation Bot moved this from 📄 To do to ☑️ Done in 📄 Euro-Office team Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

Increase max filesize

2 participants