-
Notifications
You must be signed in to change notification settings - Fork 0
Files
A session produces files two ways: the site downloads them, or you save one
yourself with screenshot(save=true) or save_pdf.
session_files lists both as one list.
There are two kinds of file in it, and the difference is how long they live.
| Belongs to | Survives the browser | Deleted by | |
|---|---|---|---|
| download | the browser | no | the Grid, with the browser |
| kept | the session | yes | an operator, in the admin UI |
The Grid's file API is list, read-one, delete-all. There is no write and no per-file delete. Every rule here falls out of that:
-
keep_filecopies the file to the server, because the original cannot be moved or removed. The download stays where it is. - Only a kept file can be deleted individually, because only a kept file is ours.
- Clearing the downloads is therefore safe: kept files are somewhere else by definition. That is the whole reason the admin UI can offer that button.
- Clearing removes the Grid's whole store — including the original of a file you kept. The kept copy is untouched, so nothing you kept is lost.
Keeping the same name again replaces it, so keep_file is safe to repeat.
keep_file takes the name exactly as session_files lists it. Chrome
deduplicates downloads, so a second report.pdf arrives as report (1).pdf and
you cannot derive it — ask for the listing, or save the file yourself:
screenshot(save=true) returns the name it used.
A kept file can be attached to a page in a later session with
upload_file(path=...), which is the main reason to keep one.
Every entry carries a signed URL that opens in a browser for a while, so a
screenshot can be shown to someone rather than described. The signature covers
that one path and an expiry; rotating the server's token revokes every link at
once. Set PUBLIC_BASE_URL for absolute links — see Deployment.
Kept files need somewhere to live. Set FLOW_DATA_DIR, the same directory that
turns on Flows. Nothing reaps them: a kept file stays until an operator
deletes it, so that directory only grows.
The action pages are generated from openapi.yaml, which is itself generated from the live MCP tool schemas — so they describe the server that shipped, not the one someone remembered. Prose belongs in wiki-notes/<tool>.md in the repo.
selenium-flow · MIT
Start here
Guides
Lifecycle
Going places
Doing things
Getting things out