Files
synapbus/internal/attachments/doc.go
T
Algis DumbrisandClaude Opus 4.6 8e2294e19d feat: implement attachments with content-addressable storage
Add file attachment support with SHA-256 content-addressable storage,
automatic deduplication, MIME detection, and garbage collection for
orphaned files. Includes MCP tools (upload_attachment, download_attachment,
gc_attachments), REST API endpoints for Web UI, and comprehensive tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:12:27 +02:00

13 lines
560 B
Go

// Package attachments provides content-addressable file storage for SynapBus.
//
// Files are stored on the local filesystem using a two-level sharded directory
// structure based on the SHA-256 hash of the content:
//
// {data_dir}/attachments/{hash[0:2]}/{hash[2:4]}/{hash}
//
// Deduplication is automatic: identical content produces the same hash and is
// stored only once on disk, while each upload creates its own metadata row in
// SQLite. Garbage collection removes orphaned files that are no longer
// referenced by any message.
package attachments