Put a file at a specific path (object-storage style)
S3/blob-style put-object: store the raw request body at the given key. The key is relative to the session's uploads mount (/mnt/user-data/uploads/ inside the sandbox) and may be nested, e.g. data/2024/report.pdf; an explicit uploads/ prefix is accepted and normalized away. Parent directories are created automatically and existing keys are overwritten. The response is the same FileMetadata as POST /v1/files, so the returned id can be used with the other file endpoints.
Path parameters
Query parameters
Session / container identifier.
Session / container identifier.
Namespace for the file. Defaults to 'session'.
Namespace for the file. Defaults to 'session'.
Request body
Raw file bytes stored at the key (S3/blob-style put-object). The media type is taken from the request Content-Type header.
Response
Successful Response
Example response
{
"created_at": "2024-01-15T10:30:00Z",
"downloadable": false,
"filename": "data.csv",
"id": "uploads/data.csv",
"mime_type": "text/csv",
"scope": {
"id": "session-abc123",
"type": "session"
},
"size_bytes": 4096,
"type": "file"
}Changes
Changed in 1 of the 11 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○