feat(upload): --private (signed URLs) + --expires#6
Merged
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds private uploads to the CLI (v0.4.0), matching the API/desktop/MCP surface.
--private→ sendsvisibility=private; prints the returned signed URL.--expires <30m|12h|7d|secs>→sign_expires_in(validated locally viaparseExpires, bounds 60s..30d); only valid with--private.visibility=private, the CLI errors instead of reporting a URL the user would wrongly trust as private (code-review defense-in-depth).parseExpireslib + 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
--privateto work for users.🤖 Generated with Claude Code