upload_attachment
Upload a file attachment to a page and get a percent-encoded relative path for pasting into markdown.
Instructions
Upload an attachment to a page. Creates the attachment directory if needed. Returns a percent-encoded relativePath ready to paste into markdown (e.g. ).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | ||
| content | Yes | File content, interpreted according to `encoding`. | |
| encoding | No | How `content` is encoded. Set this explicitly for binary files. If omitted it is inferred from contentType: textual types (text/*, application/json, image/svg+xml, */*+json, */*+xml) are read as utf8, everything else as base64. A missing contentType is treated as utf8. | |
| filename | Yes | Filename for the attachment. | |
| contentType | No | MIME type (e.g. "image/png", "text/plain"). Defaults to application/octet-stream. | |
| collectiveId | Yes |