Attachment Management

Attachments are files stored with a page. In the React editor an author adds one by pasting or dropping it into the text, or from the Attachments panel, and the editor inserts the Markdown reference automatically.

Features

Naming rules

AttachmentNameValidator (server) and attachmentNameValidator.js (editor) accept a name only if it uses just a-z, A-Z, 0-9, _ and - plus exactly one period, starts with a letter or digit, is at most 40 characters, and has no - or _ directly before the period. When an upload sends a name, its extension must match the uploaded file's.

Permissions and upload limits

Implementation

The REST servlet AttachmentResource (wikantik-rest) is mapped to /api/attachments/*; the React components are AttachmentPanel.jsx and PageEditor.jsx; storage goes through AttachmentManager in wikantik-main and the provider abstraction. Inline images and downloads are served by AttachmentServlet at /attach/{Page}/{file}.

RequestPurpose
GET /api/attachments/{Page}list attachments (name, size, version, last modified)
GET /api/attachments/{Page}/{file}download one
POST /api/attachments/{Page}multipart upload: part file, optional name
PUT /api/attachments/{Page}/{old}rename, JSON body {"newName": "..."}
DELETE /api/attachments/{Page}/{file}delete

Relationships

Cluster Hub: Wikantik Platform Development Hub: Architecture, MCP Protocols, and Agent Briefings (wikantik-development)