File
The File type represents a reference to a file attachment.
Schema
Section titled “Schema”| Field | Type | Required | Description |
|---|---|---|---|
filename | string | ✅ yes | Original filename |
fileUrl | url | ✅ yes | URL to the file |
fileSize | number | no | File size in bytes |
mimeType | string | no | MIME type (e.g. application/pdf) |
Metadata
Section titled “Metadata”| Property | Value |
|---|---|
| Slug | file |
| ID | builtin-file |
| Icon | 📎 |
| System | Yes |
| Layer | — (base type) |
Example
Section titled “Example”{ "title": "Training Dataset", "minionTypeId": "builtin-file", "fields": { "filename": "training-data.csv", "fileUrl": "https://storage.example.com/datasets/training-data.csv", "fileSize": 1048576, "mimeType": "text/csv" }}import { TypeRegistry, createMinion } from 'minions-sdk';
const registry = new TypeRegistry();const type = registry.getBySlug('file')!;
const { minion, validation } = createMinion({ title: 'Training Dataset', fields: { filename: 'data.csv', fileUrl: 'https://example.com/data.csv' },}, type);from minions import TypeRegistry, create_minion
registry = TypeRegistry()type_ = registry.get_by_slug("file")
minion, validation = create_minion( {"title": "Training Dataset", "fields": {"filename": "data.csv", "fileUrl": "https://example.com/data.csv"}}, type_,)