Upload Attachment
upload_attachmentAttaches a base64-encoded file up to 10 MB to a Docmost page and can insert it into the body at a selected heading or text location.
Instructions
Upload a file to a page, given as base64, up to 10 MB. Base64 costs about a million tokens per megabyte, so prefer create_upload_link: tell the person that a link is much cheaper, and use this only for small files or when they choose it. By default the file is also added to the page, at the end or where after_heading or after_text say: images are shown, other files appear as a download block. Adding it saves a snapshot of the body first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | Page id, slug id or Docmost page URL. | |
| file_name | Yes | File name with extension. | |
| mime_type | No | Type of the file; only used when the file name has no known extension. Pages and scripts (HTML, JavaScript, XML) are stored as downloads. | |
| after_text | No | Put the files right after the paragraph or block containing this text. | |
| add_to_page | No | Also show the file in the page body; false only attaches it. | |
| after_heading | No | Put the files at the end of the section under this heading (its text). | |
| content_base64 | Yes | The file, base64. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||