Skip to content

feat(upload): --private (signed URLs) + --expires#6

Merged
facundofarias merged 3 commits into
mainfrom
feat/private-uploads
Jul 13, 2026
Merged

feat(upload): --private (signed URLs) + --expires#6
facundofarias merged 3 commits into
mainfrom
feat/private-uploads

Conversation

@facundofarias

Copy link
Copy Markdown
Member

Adds private uploads to the CLI (v0.4.0), matching the API/desktop/MCP surface.

pixelvault upload mockup.png --private              # signed URL, 7d default
pixelvault upload mockup.png --private --expires 24h # custom lifetime (60s..30d)
  • --private → sends visibility=private; prints the returned signed URL.
  • --expires <30m|12h|7d|secs>sign_expires_in (validated locally via parseExpires, bounds 60s..30d); only valid with --private.
  • Fails closed: if the server doesn't confirm visibility=private, the CLI errors instead of reporting a URL the user would wrongly trust as private (code-review defense-in-depth).
  • New parseExpires lib + 6 unit tests. Full suite green (27), typecheck + build clean.

Reviewed (APPROVE) — privacy append is unconditional + per-file, no token leakage, bounds airtight.

Pairs with the skill doc update (separate PR) and needs an npm publish (v0.4.0 tag) for the skill's --private to work for users.

🤖 Generated with Claude Code

facundofarias and others added 3 commits July 13, 2026 10:59
`pixelvault upload --private` sends visibility=private to POST /v1/images
and prints the returned signed URL (works for link holders, expires on a
schedule). `--expires <30m|12h|7d|seconds>` sets the signed link's lifetime
(default 7d server-side; min 60s, max 30d), validated locally before upload
via a new parseExpires helper. --expires without --private is rejected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Defense-in-depth from code review: after a --private upload, verify
res.data.visibility === 'private' before reporting the URL; otherwise error
out (don't hand back a link the user would wrongly trust as private, e.g.
if a stale deploy ignored the flag). Also warn that --folder is ignored
with --private.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@facundofarias
facundofarias merged commit 8d92444 into main Jul 13, 2026
2 checks passed
@facundofarias
facundofarias deleted the feat/private-uploads branch July 13, 2026 09:06
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.

1 participant