Skip to content

feat: upgrade max upload size to 5 GB and add rolling limit env var#89

Closed
dobby-coder[bot] wants to merge 1 commit into
mainfrom
feat/upgrade-upload-limits
Closed

feat: upgrade max upload size to 5 GB and add rolling limit env var#89
dobby-coder[bot] wants to merge 1 commit into
mainfrom
feat/upgrade-upload-limits

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the frontend configuration changes for the new upload limits:

  • VITE_MAX_UPLOAD_SIZE: bumped from 2 GiB (2,147,483,648 bytes) to 5 GB (5,000,000,000 bytes)
  • VITE_ROLLING_LIMIT: new env var set to 5 GB (5,000,000,000 bytes) — 5 GB per 2 weeks per email address
  • Exported ROLLING_LIMIT from src/lib/env.ts so the frontend (and the upcoming UI warning work in Show clear warnings and errors when approaching or hitting upload limits #87) can consume it
  • Switched display calculations from binary GiB (1024^3) to decimal GB (1e9) for consistency with the "GB" label shown in the UI
  • Updated all hardcoded "2 GB" strings in locale files (EN and NL) to "5 GB"
  • Documented VITE_ROLLING_LIMIT in README

Related issues

Notes

  • The ROLLING_LIMIT is exported and available but not yet consumed in the UI — that work belongs to Show clear warnings and errors when approaching or hitting upload limits #87, which will wire it up to the /usage endpoint from cryptify#100
  • Display math was changed from binary to decimal: MAX_UPLOAD_SIZE / (1024 ** 3)MAX_UPLOAD_SIZE / 1e9. This ensures "5 GB" displays as "5.00" and not "4.66"
  • Build and type check both pass cleanly

Verification

npm run check   # 0 errors, 0 warnings
npm run build   # succeeds, 5000000000 baked into output

- Update VITE_MAX_UPLOAD_SIZE from 2 GiB (2147483648) to 5 GB (5000000000)
- Add VITE_ROLLING_LIMIT=15000000000 (15 GB per 2 weeks per email)
- Export ROLLING_LIMIT from env.ts for frontend consumption
- Switch display math from binary GiB (1024^3) to decimal GB (1e9) for
  consistency with the "GB" unit shown in the UI
- Update hardcoded "2 GB" strings in en/nl locale files to "5 GB"
- Document VITE_ROLLING_LIMIT in README

Closes #85
@rubenhensen

Copy link
Copy Markdown
Contributor

Superseded by #110 which combines this with #90 and #91.

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.

Upgrade max upload size to 5 GB with 5 GB per 2-week rolling limit

1 participant