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

Method SetAttachments

internal/server/server.go:750–753  ·  view source on GitHub ↗

SetAttachments wires the attachment storage Registry that the upload and download handlers use. Pass maxBytes = 0 to keep the defaultAttachmentMaxBytes ceiling (25 MiB).

(reg *attachments.Registry, maxBytes int64)

Source from the content-addressed store, hash-verified

748// and download handlers use. Pass maxBytes = 0 to keep the
749// defaultAttachmentMaxBytes ceiling (25 MiB).
750func (s *Server) SetAttachments(reg *attachments.Registry, maxBytes int64) {
751 s.attachments = reg
752 s.attachmentMaxBytes = maxBytes
753}
754
755// SetImageProcessor wires the image processor that the upload handler
756// uses to derive thumbnail variants (TASK-878). Optional — without it

Callers 8

newAttachmentACLFixtureFunction · 0.80
newCopyAttachmentFixtureFunction · 0.80
TestUpload_OverSizeLimitFunction · 0.80
mimeDispoFixtureFunction · 0.80
serveCmdFunction · 0.80

Calls

no outgoing calls

Tested by 7

newAttachmentACLFixtureFunction · 0.64
newCopyAttachmentFixtureFunction · 0.64
TestUpload_OverSizeLimitFunction · 0.64
mimeDispoFixtureFunction · 0.64