Skip to content

Respect Discord attachment limits - #25

Merged
itsreverence merged 1 commit into
masterfrom
codex/discord-upload-limit-hotfix
Jul 23, 2026
Merged

Respect Discord attachment limits#25
itsreverence merged 1 commit into
masterfrom
codex/discord-upload-limit-hotfix

Conversation

@itsreverence

Copy link
Copy Markdown
Owner

What changed

  • enforce Discord's default 10 MiB limit for each attachment
  • retain a separate 24 MiB aggregate media budget so multipart overhead stays under the 25 MiB request limit
  • select the 3.7 MB video variant for the reported post instead of the rejected 15.3 MB variant
  • update aggregate-budget regression coverage
  • bump the release version to 0.6.31 and rebuild the userscript

Root cause

v0.6.30 treated Discord's 25 MiB message request limit as though it were the per-file attachment limit. Discord currently applies a default 10 MiB limit to each webhook attachment, so the selected 15.3 MB MP4 was rejected with Request entity too large.

User impact

The reported video now uploads through the clean native Discord player using the highest-quality MP4 variant that fits the default webhook attachment limit. The CDN link remains hidden when an eligible variant is available.

Validation

  • npm test — 98 tests passed
  • npm run check
  • git diff --check
  • exact regression: 15,319,401-byte variant skipped, 3,744,793-byte variant selected
  • per-attachment and aggregate request budgets covered

Trust and release impact

  • no webhook URL, storage, grant, or connected-host changes
  • reduces maximum media upload size; no new network behavior
  • generated userscript rebuilt from source
  • merging publishes v0.6.31 through the existing release workflow

@itsreverence
itsreverence merged commit f5769de into master Jul 23, 2026
3 checks passed
@itsreverence
itsreverence deleted the codex/discord-upload-limit-hotfix branch July 23, 2026 02:46
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