Skip to main content
POST
Write file
Writes a file onto the machine hosting a cloud browser, so the agent can attach it to a form, upload it to a site, or read it. The content is sent base64-encoded; an existing file at the same path is overwritten. Returns the written file’s path and size_bytes.
session_id is the browser session id from the session’s RunnerSessionEvent, not the agent session id. See list files for how to obtain it.
Files are capped at 8 MiB; larger ones are rejected. Only ~/Downloads is writable.

Path parameters

string
required
The browser session id.

Request body

string
required
Destination path. Absolute, or relative to the browser’s home (~/Downloads/cv.pdf).
string
required
The file’s bytes, base64-encoded.

Response

string
The written file’s resolved path.
integer
Bytes written.

Examples

Response
Tell the agent where the file is, for example with a message: “Upload ~/Downloads/cv.pdf in the application form.”