This repository was archived by the owner on Feb 27, 2026. It is now read-only.
feat: make upload chunk size configurable#273
Merged
danielalves96 merged 3 commits intoOct 2, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Adds a configurable upload chunk size
apps/web/src/utils/chunked-upload.tsnow respects NEXT_PUBLIC_UPLOAD_CHUNK_SIZE_MB and falls back to optimal sizing when unset/invalid.apps/web/.env.exampleapps/docs/content/docs/3.2-beta/manual-installation.mdx🔗 Related Issue(s)
None
💡 Motivation and Context
Although the optimal chunk size calculation is great, it causes issues with some proxies with limited upload limit, like Cloudflare (100mb on free plan). Using chunk uploads of less than 100mb in this case would fix the issue.
🤖 Use of Artificial Intelligence (AI)
The use of AI tools is absolutely welcome and not an issue. For transparency and continuous improvement, please answer the following:
🧪 How Has This Been Tested?
Manual User Action Tests
[Env: set below-threshold file]
apps/web/.env, setNEXT_PUBLIC_UPLOAD_CHUNK_SIZE_MB=50.[Env: set above-threshold file]
[Env: unset fallback]
NEXT_PUBLIC_UPLOAD_CHUNK_SIZE_MBand restartpnpm dev.[Optional invalid value check]
NEXT_PUBLIC_UPLOAD_CHUNK_SIZE_MB=abc), restart, reload.📸 Screenshots (if appropriate)
N/A
🔄 Types of Changes
Check the relevant option(s) below:
✅ Checklist
nextbranch🙏 Thank you for your contribution!