Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/commands/media/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function registerMediaUpload(media: Command) {
.addOption(
new Option(
"--visibility <visibility>",
"Who can open the share page. Defaults to the most private option your plan allows",
"Who can open the share page. Defaults to your project's visibility in Argos: public for a public project, team for a private one",
).choices(["team", "public"]),
)
.addOption(
Expand Down
3 changes: 3 additions & 0 deletions packages/core/mocks/handlers/createMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ function buildMedia(body: CreateMediaRequestBody, status: string) {
sizeBytes: body.size,
width: null,
height: null,
// The real server infers this from the project when the caller sends
// nothing; there is no project here, so the mock stands in with the private
// answer. Tests that care about the choice assert on `createMediaRequests`.
visibility: body.visibility ?? "team",
status,
expiresAt: null,
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ export interface UploadMediaParameters {

/**
* Who can open the share page. `team` requires an Argos session; `public` only
* requires the URL. Defaults to the most private option the plan allows.
* requires the URL.
*
* Leave it out — the usual case — and the media takes the visibility of its
* project in Argos: `public` for a public project, `team` for a private one.
* `team` requires a paid plan.
*/
visibility?: MediaVisibility;

Expand Down
10 changes: 8 additions & 2 deletions skills/argos-upload/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,14 @@ EXIF — including GPS, if the camera recorded it — does not reach Argos. With
## Visibility, and what it does not cover

`--visibility` controls the **share page** — `team` requires an Argos session,
`public` does not. It defaults to the most private option the plan allows: `team`
on Pro, and `public` on the free plan, which cannot do `team` at all.
`public` does not. It defaults to the **project's** visibility in Argos: `public`
for a public project, `team` for a private one. So the usual upload needs no flag
at all. `team` is Pro-only; on the free plan every share page is public, and asking
for `team` is rejected rather than silently downgraded.

Re-uploading does not revisit this. A media keeps the visibility it was created
with unless a later upload passes `--visibility` explicitly, so a screenshot
deliberately kept team-only stays that way.

It does **not** protect the file: media files are always reachable at an
unguessable CDN URL, because GitHub fetches embedded images server-side with no
Expand Down
Loading