Skip to content

Add concurrency control for file uploads via FILES_MAX_UPLOAD_CONCURRENCY#26424

Merged
AlexGaillard merged 28 commits intodirectus:mainfrom
thomas-svrts:codex/add-tus_max_parallel-config-option
Jan 12, 2026
Merged

Add concurrency control for file uploads via FILES_MAX_UPLOAD_CONCURRENCY#26424
AlexGaillard merged 28 commits intodirectus:mainfrom
thomas-svrts:codex/add-tus_max_parallel-config-option

Conversation

@thomas-svrts
Copy link
Contributor

@thomas-svrts thomas-svrts commented Dec 23, 2025

Scope

What's changed:

  • Added a client-side concurrency limit for file uploads in the Studio
  • Prevents unbounded parallel uploads during bulk file selection
  • Applies to both TUS-enabled and non-TUS uploads
  • Default behavior remains unchanged (unlimited unless configured)

Potential Risks / Drawbacks

  • Behavior change only occurs when the new limit is explicitly enabled

Tested Scenarios

  • Bulk upload of 200+ image files with TUS enabled (small and large chunks tested)
  • Bulk upload of 200+ image files with TUS disabled
  • Verified single-file upload behavior is unchanged

Review Notes / Questions

  • Default is unlimited to preserve backward compatibility
  • Concurrency limiting is implemented entirely client-side in the Studio
  • No server-side or TUS protocol changes are introduced

Checklist


Fixes #26423

@thomas-svrts thomas-svrts force-pushed the codex/add-tus_max_parallel-config-option branch from f4147c4 to 511d274 Compare December 23, 2025 17:52
@thomas-svrts thomas-svrts force-pushed the codex/add-tus_max_parallel-config-option branch from 511d274 to 32fc364 Compare December 23, 2025 18:07
Copy link
Member

@ComfortablyCoding ComfortablyCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @thomas-svrts! Left a few comments, functionally this seems to work 👍

@ComfortablyCoding ComfortablyCoding changed the title Feature: Limit concurrent file uploads in Studio Add concurrency control for file uploads via FILES_MAX_UPLOAD_CONCURRENCY Dec 26, 2025
Copy link
Member

@ComfortablyCoding ComfortablyCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @thomas-svrts and congratulations on your first contribution to Directus 🥳

@ComfortablyCoding ComfortablyCoding dismissed their stale review December 30, 2025 15:59

TUS is no longer working

@AlexGaillard AlexGaillard merged commit 273cb56 into directus:main Jan 12, 2026
70 of 71 checks passed
@github-actions github-actions bot added this to the Next Release milestone Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio starts all file uploads in parallel, causing server instability

3 participants