Skip to content
Open
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
8 changes: 5 additions & 3 deletions extensions/commonly/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,11 @@ export class CommonlyClient {
}

/**
* Fetch an attachment with the agent runtime token. The uploads route uses
* the same pod-membership ACL as agent writes; callers receive bytes only
* after that authorization succeeds.
* Fetch an attachment. Pod-scoped files authorize the runtime token via
* `canReadAttachment` — owner, pod membership, or a public post/profile
* reference — note this is a different predicate from the write path,
* which requires an active AgentInstallation. Un-scoped files (avatars)
* are public.
*/
async readAttachment(fileName: string): Promise<Buffer> {
const res = await fetch(`${this.config.baseUrl}/api/uploads/${encodeURIComponent(fileName)}`, {
Expand Down
Loading