File
Read and write workspace files
Read and parse files from uploads or URLs, write new workspace files, or append content to existing files.
Parse one or more uploaded files or files from URLs (text, PDF, CSV, images, etc.)
| Parameter | Type | Required | Description |
|---|
filePath | string | No | No description |
file | file | No | No description |
fileType | string | No | No description |
| Parameter | Type | Description |
|---|
files | file[] | Parsed files as UserFile objects |
combinedContent | string | Combined content of all parsed files |
Create a new workspace file. If a file with the same name already exists, a numeric suffix is added (e.g.,
| Parameter | Type | Required | Description |
|---|
fileName | string | Yes | File name (e.g., "data.csv"). If a file with this name exists, a numeric suffix is added automatically. |
content | string | Yes | No description |
contentType | string | No | MIME type for new files (e.g., "text/plain"). Auto-detected from file extension if omitted. |
| Parameter | Type | Description |
|---|
id | string | File ID |
name | string | File name |
size | number | File size in bytes |
url | string | URL to access the file |
Append content to an existing workspace file. The file must already exist. Content is added to the end of the file.
| Parameter | Type | Required | Description |
|---|
fileName | string | Yes | No description |
content | string | Yes | No description |
| Parameter | Type | Description |
|---|
id | string | File ID |
name | string | File name |
size | number | File size in bytes |
url | string | URL to access the file |