add_attachment
Attach files to any Huly object by providing a local file path, URL, or base64 data. Returns the attachment ID and download link.
Instructions
Add an attachment to a Huly object. Provide ONE of: filePath (local file - preferred), fileUrl (fetch from URL), or data (base64). Returns the attachment ID and download URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Base64-encoded file data (fallback for small files <10KB) | |
| space | Yes | a string that will be trimmed | |
| pinned | No | Whether to pin the attachment (default: false) | |
| fileUrl | No | URL to fetch file from (for remote files) | |
| filePath | No | Local file path to upload (preferred - avoids context flooding) | |
| filename | Yes | a string that will be trimmed | |
| objectId | Yes | a string that will be trimmed | |
| contentType | Yes | a string that will be trimmed | |
| description | No | Attachment description | |
| objectClass | Yes | a string that will be trimmed |