MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / AttachmentMetadata

Struct AttachmentMetadata

internal/cli/client.go:1438–1445  ·  view source on GitHub ↗

AttachmentMetadata mirrors the response headers of HEAD /api/v1/workspaces/{slug}/attachments/{id}. The server doesn't expose a separate JSON metadata endpoint — HEAD returns the same Content-Type / Content-Length / etc. headers a GET would set, with no body. That's enough for the CLI's `pad attachm

Source from the content-addressed store, hash-verified

1436// no body. That's enough for the CLI's `pad attachment show` to
1437// surface size + MIME without paying for the bytes.
1438type AttachmentMetadata struct {
1439 ID string `json:"id"`
1440 MIME string `json:"mime"`
1441 Size int64 `json:"size"`
1442 ContentDisposition string `json:"content_disposition,omitempty"`
1443 ETag string `json:"etag,omitempty"`
1444 LastModified string `json:"last_modified,omitempty"`
1445}
1446
1447// HeadAttachment issues a HEAD request and returns the headers as
1448// structured metadata. Variant is forwarded the same way as

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected