Skip to content

feat: configurable chunk size via TOML config (default 5 MB)#112

Merged
rubenhensen merged 1 commit intomainfrom
feat/configurable-chunk-size
Apr 24, 2026
Merged

feat: configurable chunk size via TOML config (default 5 MB)#112
rubenhensen merged 1 commit intomainfrom
feat/configurable-chunk-size

Conversation

@rubenhensen
Copy link
Copy Markdown
Contributor

Summary

  • Remove the hardcoded CHUNK_SIZE constant (was 10 MiB) from main.rs
  • Add an optional chunk_size field to CryptifyConfig in config.rs, defaulting to 5,000,000 bytes (5 MB) when not specified in TOML
  • Update upload_chunk validation and Rocket body-size limits to use the configured value
  • Add chunk_size = 5000000 example to conf/config.dev.toml

Test plan

  • Verify cargo check passes (done locally)
  • Deploy with no chunk_size in TOML and confirm the default 5 MB limit applies
  • Deploy with a custom chunk_size value and confirm it is respected
  • Upload a chunk exceeding the configured limit and verify the error message shows the correct byte count

@rubenhensen rubenhensen merged commit b164d6f into main Apr 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant