File Upload Request
file_upload_requestGet a one-time uploader script to push a local file into a shared file.
For large local HTML/Markdown files that don't fit inline in
file_create/file_update. Returns upload_url, upload_token, an
expires_in_seconds TTL, and a self-deleting Python script.
Save the script to disk and run python3 upload.py /path/to/file;
it reads the file, POSTs it to the server with the one-time token,
prints the resulting file id (and public URL if publish=true), and
deletes itself on success. The token is single-use and expires in ~10 min.
Update mode: pass file_id to append the uploaded body as a new
version to an existing shared file (the title is ignored; the existing
file's title/slug/share_token are preserved, and the bucket mirror is
re-published to the new version when the file is already published).
This is the supported way to push a new version of a large file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Override agent identity | |
| title | Yes | File title (used only when creating a new file; ignored in update mode) | |
| file_id | No | Existing file UUID to append a new version to (update mode). Omit to create a new file. | |
| publish | No | If true, the file is published immediately (returns public URLs). In update mode this is idempotent if already published. | |
| work_id | No | Attach the uploaded file to this work item UUID | |
| filename | No | Optional filename (used for format sniffing and as the script's default path) | |
| project_id | No | Attach the uploaded file to this project UUID (kind=artifact) | |
| content_format | No | 'html', 'markdown', 'diagram' (teamshared.diagram/v1 JSON/YAML), or 'auto' (sniff from the file extension; *.diagram.yaml/json) | auto |
| upload_base_url | No | Optional server origin (e.g. https://teamshared.com). Defaults to settings.public_url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||