File Uploads
Upload and attach files to any entity. The Filesystem module handles storage, and files can be linked to products, leads, people, messages, and more.
Filesystem Entity
| Field | Type | Description |
|---|---|---|
| id / uuid | ID! | Unique identifiers |
| name | String! | File name |
| url | String! | Public URL |
| type | String! | MIME type |
| size | Int | File size in bytes |
| field_name | String | Field name for categorization |
| attributes | Mixed | Additional metadata |
| created_at | DateTime | Upload timestamp |
Upload a File
mutation($file: Upload!) {
upload(file: $file) {
id uuid name url type size
}
}Attach to Entities
# Attach to a lead
mutation {
attachFileToLead(lead_id: 1, filesystem_id: 1, field_name: "contract") {
id files { url name }
}
}
# Upload directly to a product
mutation($file: Upload!) {
uploadFileToProduct(product_id: 1, file: $file) {
id files { url name type }
}
}
# Attach to a person
mutation {
attachFileToPeople(people_id: 1, filesystem_id: 1) {
id files { url name }
}
}Create from URL
mutation {
createFileSystem(input: {
url: "https://example.com/document.pdf"
name: "Contract Document"
}) {
id uuid url name
}
}