Add a file to a version
version_file_uploadAdd a file to a version that already exists (for a NEW upload, pass files with the upload call instead: the version then shows them from the start): returns a presigned upload URL for exactly file_size bytes; upload with the curl command from next_step (this needs a shell that can run curl). The file belongs to the version as soon as the bytes land (no complete call); to show it in the notes, put the markdown line it returns on a line of its own at the start of the notes in version_notes_update (it becomes a file block). By convention attach the working files that made the version as ONE archive named source.zip (zip the project folder without node_modules, build output or renders), so the next agent gets a consistent snapshot. Max 30 MB per file, 20 files per version. A version's files never change: a name can be used once per version; to change the source, upload a new version and attach to that. Needs full_access (edit access) and membership of the asset's team: any version, not only ones you uploaded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name as it will be downloaded, e.g. source.zip | |
| asset_id | Yes | The version (an upload's asset_id / version_id), or an asset id (its current version) | |
| file_size | Yes | Exact size of the local file in bytes (stat -f%z <file> on macOS, stat -c%s <file> on Linux) | |
| content_type | No | MIME type, e.g. application/zip (default application/octet-stream) |