Skip to main content

Get Attachments

invoke('get_attachments', { taskId: 1 })
Returns all attachments for a task.
[
  {
    "id": 1,
    "taskId": 1,
    "fileName": "design-spec.pdf",
    "mimeType": "application/pdf",
    "size": 245000,
    "createdAt": "2025-01-15T10:00:00Z"
  }
]

Upload Attachments (Tauri IPC)

invoke('upload_attachment', {
  taskId: 1,
  fileData: [...],       // Uint8Array as number array
  fileName: "spec.pdf",
  mimeType: "application/pdf"
})
Uploads a single file attachment to a task. The frontend handles multiple files by calling this for each file sequentially.
FieldRequiredDescription
taskIdYesTarget task ID
fileDataYesFile contents as byte array
fileNameYesOriginal file name
mimeTypeYesMIME type (e.g. application/pdf, image/png)

Upload Attachments (HTTP)

POST /api/tasks/:taskId/attachments
Content-Type: multipart/form-data
Upload one or more files using standard multipart form data. Files should be sent under the files field name.

Delete Attachment

invoke('delete_attachment', { id: 1 })
Permanently removes an attachment and its stored file data.
Attachments are stored in the local SQLite database. They are included in the task detail view and can be referenced by Claude agents during task execution.