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

Struct AttachmentMetadata

internal/cli/client.go:1389–1396  ·  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

1387// no body. That's enough for the CLI's `pad attachment show` to
1388// surface size + MIME without paying for the bytes.
1389type AttachmentMetadata struct {
1390 ID string `json:"id"`
1391 MIME string `json:"mime"`
1392 Size int64 `json:"size"`
1393 ContentDisposition string `json:"content_disposition,omitempty"`
1394 ETag string `json:"etag,omitempty"`
1395 LastModified string `json:"last_modified,omitempty"`
1396}
1397
1398// HeadAttachment issues a HEAD request and returns the headers as
1399// structured metadata. Variant is forwarded the same way as

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected