browser_upload_file

Summary: Browser Upload FilePOST /api/execute/browser_upload_file

Attaches one or more local filesystem files to an HTML file input control, bypassing the native OS file picker dialog. The target locator—supporting OwlMark tokens, CSS queries, pixel coordinates, or natural-language phrases—can reference either an input[type=file] node directly or a styled button wrapper that delegates to one. Once the underlying file input is resolved, the backend verifies that every specified file path exists on disk (or stages multipart uploads into temporary paths) and populates the element's internal FileList object. Blink then dispatches synthetic input and change events so client-side upload scripts, image previewers, and Dropzone handlers process the attached files immediately.

Parameters

NameTypeRequiredDescription
context_idstringyesWorkspace handle where the file attachment operation will take place.
selectorstringyesFile input or trigger button via OwlMark token, CSS locator, coordinates, or description.
file_pathsstringyesArray or JSON-encoded list of absolute server filesystem paths to attach.

Usage

result = await browser.upload_file(context_id=context_id, selector="#element-id", file_paths="value")

See Also