mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(attachments): R2 toggle, storage metrics, and demo R2 config
Add an ATTACHMENTS_ENABLED switch (default on when R2 is bound) via a central getAttachmentBucket helper, surface R2 + estimated KV usage against the free tier on the status page and /api/stats (refreshed by the hourly cron), let setup.sh create and wire the R2 bucket, and bind the demo bucket so the deployed demo has attachments. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
/** Maximum total size of emails stored per feed (bytes). */
|
||||
export const FEED_MAX_BYTES = 524288; // 512 KB
|
||||
|
||||
/** Cloudflare R2 free tier storage allowance (bytes). */
|
||||
export const R2_FREE_TIER_BYTES = 10 * 1024 ** 3; // 10 GB
|
||||
|
||||
/** Cloudflare KV free tier storage allowance (bytes). */
|
||||
export const KV_FREE_TIER_BYTES = 1 * 1024 ** 3; // 1 GB
|
||||
|
||||
/** Cache TTL for ForwardEmail.net IP list (milliseconds). */
|
||||
export const FORWARD_EMAIL_IPS_CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
|
||||
|
||||
|
||||
Reference in New Issue
Block a user