gitflarePublicPartly agent-ready50
cf-r2-drop
Drag-and-drop file sharing on Cloudflare R2: multipart uploads, expiring share links, previews, download counts, lifecycle expiry.
- LicenseApache-2.0
- LanguageTypeScript
- Last landed
0e4544fOct 20, 2026
Serve the share page from the extensionless asset path
0e4544fexport interface ObjLike { key: string; customMetadata?: Record<string, string> }/** Keys whose customMetadata.expiresAt is a number in the past. */export function expiredKeys(objects: ObjLike[], now = Date.now()): string[] { return objects .filter((o) => { const t = Number(o.customMetadata?.expiresAt); return Number.isFinite(t) && o.customMetadata?.expiresAt !== "" && t <= now; }) .map((o) => o.key);}