fix(office_server): bump axum body limit to 100MB #21

Merged
zaelgohary merged 1 commit from development_fix_upload_body_limit into development 2026-04-27 14:14:37 +00:00
Member

Summary

hero_office_server's axum router used the framework default body limit of 2 MB, so browser uploads via upload_document JSON-RPC were silently rejected with 413 Failed to buffer the request body: length limit exceeded for any file >~1.5 MB raw. Bumps the limit to 100 MB (allowing ~75 MB raw files after base64 inflation).

Closes #20

Changes

  • crates/hero_office_server/src/main.rsDefaultBodyLimit::max(100 * 1024 * 1024) layer on the router

Test Results

  • cargo fmt --check
  • cargo check --workspace
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

Manual verification

  • 5 MB JSON-RPC upload via curl returns {"success":true,"size":5242880}
  • 25 MB upload completes in ~200 ms
  • Browser upload of a 47 MB PDF lands on disk; listing shows the new file
## Summary hero_office_server's axum router used the framework default body limit of 2 MB, so browser uploads via `upload_document` JSON-RPC were silently rejected with `413 Failed to buffer the request body: length limit exceeded` for any file >~1.5 MB raw. Bumps the limit to 100 MB (allowing ~75 MB raw files after base64 inflation). ## Related Issue Closes #20 ## Changes - `crates/hero_office_server/src/main.rs` — `DefaultBodyLimit::max(100 * 1024 * 1024)` layer on the router ## Test Results - `cargo fmt --check` ✅ - `cargo check --workspace` ✅ - `cargo clippy --workspace -- -D warnings` ✅ - `cargo test --workspace` ✅ ## Manual verification - 5 MB JSON-RPC upload via curl returns `{"success":true,"size":5242880}` - 25 MB upload completes in ~200 ms - Browser upload of a 47 MB PDF lands on disk; listing shows the new file
zaelgohary merged commit a0910ea32a into development 2026-04-27 14:14:37 +00:00
zaelgohary deleted branch development_fix_upload_body_limit 2026-04-27 14:14:38 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_office!21
No description provided.