Backend: - POST /api/uploads/init validates against event_config (size, video policy, duration), creates an uploads row, and returns either a single presigned PUT or a multipart batch of presigned part URLs depending on file size (50 MB threshold, 10 MB parts). - POST /api/uploads/:id/confirm completes multipart on R2 if needed, HEADs the object to verify upload, and flips status to approved (post-moderation) or pending (pre-moderation). - POST /api/uploads/:id/abort cancels in-flight multipart and removes the row. - GET /api/gallery returns approved uploads in cursor-paginated reverse chronological order, with public R2 URLs. - GET /api/stats returns lightweight counts for future home/admin use. Frontend: - lib/upload.ts handles single and multipart uploads via XHR with progress callbacks, video duration extraction, and abort signals. - /enviar: real form with file picker (image/video), author name, message, per-file progress, multi-file support, and a success state. - /galeria: responsive grid of approved items with lazy-loaded images, video preview tiles, infinite "load more", and a fullscreen lightbox showing the author and message. Schema: turnstileToken is now optional so the MVP works without Turnstile wired up; we layer it back in later. https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL |
||
|---|---|---|
| .. | ||
| migrations | ||
| src | ||
| drizzle.config.ts | ||
| package.json | ||
| tsconfig.json | ||