Upload Workspace file
upload_workspace_fileWrite a file to a Plori Workspace, replacing any file at that path. Send small UTF-8 text directly; for larger or binary files, get a single-use upload URL and curl command.
Instructions
Write a file into a Workspace's current files, replacing any file at path. For UTF-8 text up to 262144 bytes, pass it as content: the file is written before the call returns. For a larger or binary file, omit content: the call returns upload_url and a curl command that uploads one local file of up to 33554432 bytes (32 MiB). Run the command in a shell within 10 minutes. The URL needs no other credential and accepts one upload. While a run uses the Workspace's files, the write is refused with 409 agent_busy. Try again after the run ends. Members and viewers of a shared Workspace cannot write files (403).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file's path, relative to the Workspace root, for example docs/notes.md. Missing directories are created. | |
| content | No | The file's UTF-8 text, up to 262144 bytes. Omit it, or pass an empty string, to get an upload URL instead. | |
| workspace_id | Yes | The Workspace UUID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file's path, from the Workspace root. | |
| size | No | The bytes written, when written is true. | |
| command | No | The curl command that uploads the file: replace LOCAL_FILE with the local file's path and run it in a shell. | |
| written | Yes | True when content was written to the file. False when the call returned an upload URL instead. | |
| max_bytes | No | The largest file upload_url accepts, in bytes. | |
| expires_at | No | When upload_url stops being accepted. | |
| upload_url | No | The URL that accepts one upload of the file as multipart form part file. It needs no other credential. | |
| workspace_id | Yes | The Workspace UUID. |