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.
Path parameters
Request body
Response
File(s) attached.
Changes
Changed in 4 of the 49 revisions of this API.13
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
- ▲
- ○
added the new optional request property
timeoutnew-optional-request-property
- ○
- ○
endpoint added
endpoint-added
- ○