v48

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-0238179.2 KB
Interaction

Attach a file to an upload control

Attaches files from the configured upload directory without going through the native OS file dialog. Set CAMOFOX_UPLOADS_DIR to a directory that contains the files (default: ~/.camofox/uploads). Two strategies are tried in order: (1) if an <input type="file"> is already present, call Playwright setInputFiles on it directly (works for hidden inputs); (2) otherwise arm a filechooser listener, activate the trigger element (ref or selector) via keyboard (focus + Enter) then a forced click as fallback, and call setFiles on the resulting chooser. Each path must be an absolute path that resolves inside the configured upload directory.

post/tabs/{tabId}/upload

Path parameters

tabIdstring required

Request body

userIdstring required
refstring

Trigger element ref (e.g. e36). Optional when an input[type=file] already exists.

selectorstring

Trigger element CSS/Playwright selector. Optional when an input[type=file] already exists.

timeoutinteger

Overall budget in ms to wait for an upload UI (in-app panel input or native file chooser) to appear after the trigger is activated. Ignored values (non-numeric or <= 0) fall back to the default.

Response

File(s) attached.