Skip to content

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

Open
chrip wants to merge 3 commits into
mainfrom
feat/210-max-filesize
Open

feat: raise maxDownloadBytes and inputLimits to 500MB, add runtime env vars (#210)#237
chrip wants to merge 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 added 3 commits June 24, 2026 12:58
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 <christoph.schaefer@nextcloud.com>
Assisted-by: ClaudeCode:claude-sonnet-4-6
…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
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📄 To do

Development

Successfully merging this pull request may close these issues.

Increase max filesize

1 participant