Commit Graph

8 Commits

Author SHA1 Message Date
Jeff Emmett 5464484d73 fix: Use catch-all route to avoid /{slug}/dl vs /static/ conflict
Go 1.22+ panics when two patterns overlap without one being strictly
more specific. GET /{slug}/dl and GET /static/ both match /static/dl.
Replaced individual wildcard routes with GET /{path...} catch-all
that manually dispatches to batch handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:27:19 -04:00
Jeff Emmett c5b710498f feat: Custom batch slugs with top-level URLs (no /b/ prefix)
Batch uploads now use top-level URLs (e.g., /my-photos instead of
/b/abc123). Users can name their batch slug or let it auto-generate.
Slug field dynamically shows / prefix for batches, /f/ for single files.
Added slug validation with live feedback and reserved slug protection.
Old /b/ URLs redirect permanently for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:23:03 -04:00
Jeff Emmett ff62bbf5a9 feat: Batch-level password auth — unlock once for all files
Password-protected batch uploads now require a single password entry
at /b/{id}/auth. The batch cookie (auth_b_{id}) also grants access
to individual file pages (/f/{id}), so users don't re-enter password
per file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 16:10:45 -04:00
Jeff Emmett 573e7d0d80 feat: Thumbnail grid for batch page with Download All as zip
Batch page now shows files as a thumbnail grid (images render as
cover-fit thumbnails, other types show icons). Added /b/{id}/dl
endpoint that streams all batch files as a zip archive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 16:04:40 -04:00
Jeff Emmett d8ff9154a1 feat: Batch uploads with shared /b/{id} link to view all files
Multi-file uploads now generate a batch ID, grouping files together.
A single batch URL (e.g. /b/Ab3xKz9q) shows all files with previews
and download links. Schema migrates automatically for existing DBs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:41:43 -04:00
Jeff Emmett 86e0df4250 fix: Add no-cache header on HTML and favicon handler to prevent 404
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:15:06 -04:00
Jeff Emmett 86edcbdc21 feat: Add download page with view/download buttons
GET /f/{id} now shows a file info page with metadata and action buttons
instead of redirecting directly. Previewable files (images, video, audio,
text, PDF) get a "View" button (inline disposition). All files get a
"Download" button. Actual redirects moved to /f/{id}/dl and /f/{id}/view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:36:05 -07:00
Jeff Emmett 374c55770d feat: Initial upload-service implementation
Go service streaming file uploads to Cloudflare R2 with SQLite metadata.
Features: drag-and-drop web UI, presigned URL downloads, password protection,
expiry with cleanup, rate limiting, CLI tool, Infisical secret injection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:21:57 -07:00